diff --git a/src/app/modules/agent/code_qa_runtime/answer_policy.py b/src/app/modules/agent/code_qa_runtime/answer_policy.py index a7cb4db..f4f6c7e 100644 --- a/src/app/modules/agent/code_qa_runtime/answer_policy.py +++ b/src/app/modules/agent/code_qa_runtime/answer_policy.py @@ -4,6 +4,7 @@ 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 +from app.modules.agent.code_qa_runtime.short_answer_formatter import CodeQaShortAnswerFormatter @dataclass(slots=True, frozen=True) @@ -16,6 +17,9 @@ class CodeQaPolicyDecision: class CodeQaAnswerPolicy: + def __init__(self, formatter: CodeQaShortAnswerFormatter | None = None) -> None: + self._formatter = formatter or CodeQaShortAnswerFormatter() + def decide( self, *, @@ -29,34 +33,39 @@ class CodeQaAnswerPolicy: target = path_scope[0] if path_scope else "запрошенный файл" return CodeQaPolicyDecision( answer_mode="not_found", - answer=f"Файл {target} не найден.", + answer=self._formatter.open_file_not_found(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"}: + if sub_intent == "EXPLAIN" and symbol_resolution.status == "not_found": return CodeQaPolicyDecision( - answer_mode="degraded", - answer=self._symbol_message(symbol_resolution.status, symbol_resolution.alternatives), + answer_mode="not_found", + answer=self._formatter.entity_not_found(self._target_label(router_result), symbol_resolution.alternatives), should_call_llm=False, - branch="explain_unresolved_symbol", - reason=f"symbol_resolution_{symbol_resolution.status}", + branch="explain_not_found", + reason="symbol_resolution_not_found", + ) + if sub_intent == "EXPLAIN" and symbol_resolution.status == "ambiguous": + return CodeQaPolicyDecision( + answer_mode="ambiguous", + answer=self._formatter.entity_ambiguous(self._target_label(router_result), symbol_resolution.alternatives), + should_call_llm=False, + branch="explain_ambiguous_symbol", + reason="symbol_resolution_ambiguous", ) 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, + answer=self._formatter.insufficient(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 "Сущность не найдена в доступном коде." + def _target_label(self, router_result: IntentRouterResult) -> str: + candidates = [item.strip() for item in list(router_result.query_plan.symbol_candidates or []) if item and item.strip()] + return candidates[0] if candidates else "запрошенная сущность" diff --git a/src/app/modules/agent/code_qa_runtime/executor.py b/src/app/modules/agent/code_qa_runtime/executor.py index 2b9944b..626464e 100644 --- a/src/app/modules/agent/code_qa_runtime/executor.py +++ b/src/app/modules/agent/code_qa_runtime/executor.py @@ -1,6 +1,7 @@ from __future__ import annotations import logging +from difflib import SequenceMatcher from time import perf_counter from app.modules.agent.code_qa_runtime.answer_policy import CodeQaAnswerPolicy @@ -50,6 +51,9 @@ class CodeQaRuntimeExecutor: 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] = [] + answer_policy_branch = "" + decision_reason = "" + post_gate_snapshot: dict = {} state = CodeQaExecutionState( user_query=user_query, rag_session_id=rag_session_id, @@ -76,9 +80,10 @@ class CodeQaRuntimeExecutor: started = perf_counter() raw_rows = self._retrieve(state) timings_ms["retrieval"] = self._elapsed_ms(started) + retrieval_report = self._retrieval.consume_retrieval_report() or {} + raw_rows, retrieval_report = self._hydrate_entrypoint_sources(state, raw_rows, retrieval_report) 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) @@ -101,8 +106,10 @@ class CodeQaRuntimeExecutor: 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"] + pre_gate_input = self._build_pre_gate_input(state) + started = perf_counter() gate_decision = evaluate_evidence(state.evidence_pack) - timings_ms["pre_evidence_gate"] = 0 + timings_ms["pre_evidence_gate"] = self._elapsed_ms(started) state.answer_mode = "normal" if gate_decision.passed else "degraded" state.degraded_message = gate_decision.degraded_message runtime_trace.append( @@ -110,31 +117,51 @@ class CodeQaRuntimeExecutor: "step": "pre_evidence_gate", "status": "passed" if gate_decision.passed else "blocked", "timings_ms": {"pre_evidence_gate": timings_ms["pre_evidence_gate"]}, + "input": pre_gate_input, "output": { "passed": gate_decision.passed, "failure_reasons": list(gate_decision.failure_reasons), "degraded_message": gate_decision.degraded_message, + "evidence_count": state.evidence_pack.evidence_count, }, } ) decision = self._answer_policy.decide(router_result=state.router_result, gate_decision=gate_decision) + answer_policy_branch = decision.branch + decision_reason = decision.reason if not decision.should_call_llm: state.answer_mode = decision.answer_mode + started = perf_counter() runtime_trace.append( { "step": "llm", "status": "skipped", + "timings_ms": {"llm": self._elapsed_ms(started)}, "output": { "reason": "policy_short_circuit", "answer_mode": decision.answer_mode, + "decision_reason": decision.reason, + "answer_policy_branch": decision.branch, }, } ) + started = perf_counter() + timings_ms["post_evidence_gate"] = self._elapsed_ms(started) + post_gate_snapshot = { + "input": { + "answer_mode": decision.answer_mode, + "draft_present": False, + "resolved_target": self._resolved_target(state), + }, + "output": {"reason": "no_draft_answer"}, + } runtime_trace.append( { "step": "post_evidence_gate", "status": "skipped", - "output": {"reason": "no_draft_answer"}, + "timings_ms": {"post_evidence_gate": timings_ms["post_evidence_gate"]}, + "input": post_gate_snapshot["input"], + "output": post_gate_snapshot["output"], } ) return self._finalize( @@ -145,13 +172,41 @@ class CodeQaRuntimeExecutor: llm_used=False, timings_ms=timings_ms, runtime_trace=runtime_trace, + answer_policy_branch=answer_policy_branch, + decision_reason=decision_reason, + pre_gate_input=pre_gate_input, + gate_decision=gate_decision, + post_gate_snapshot=post_gate_snapshot, ) if self._llm is None: + answer_policy_branch = "llm_unavailable" + decision_reason = "llm_service_missing" + started = perf_counter() runtime_trace.append( { "step": "llm", "status": "skipped", - "output": {"reason": "llm_unavailable"}, + "timings_ms": {"llm": self._elapsed_ms(started)}, + "output": {"reason": "llm_unavailable", "answer_policy_branch": answer_policy_branch, "decision_reason": decision_reason}, + } + ) + started = perf_counter() + timings_ms["post_evidence_gate"] = self._elapsed_ms(started) + post_gate_snapshot = { + "input": { + "answer_mode": state.answer_mode, + "draft_present": False, + "resolved_target": self._resolved_target(state), + }, + "output": {"reason": "no_draft_answer"}, + } + runtime_trace.append( + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": {"post_evidence_gate": timings_ms["post_evidence_gate"]}, + "input": post_gate_snapshot["input"], + "output": post_gate_snapshot["output"], } ) return self._finalize( @@ -162,6 +217,11 @@ class CodeQaRuntimeExecutor: llm_used=False, timings_ms=timings_ms, runtime_trace=runtime_trace, + answer_policy_branch=answer_policy_branch, + decision_reason=decision_reason, + pre_gate_input=pre_gate_input, + gate_decision=gate_decision, + post_gate_snapshot=post_gate_snapshot, ) 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) @@ -186,10 +246,29 @@ class CodeQaRuntimeExecutor: "output": { "prompt_name": prompt_name, "answer_preview": draft.answer[:300], + "resolved_target": self._resolved_target(state), + "answer_policy_branch": answer_policy_branch, + "decision_reason": decision_reason, }, } ) - validation = self._post_gate.validate(answer=draft.answer, answer_mode=state.answer_mode, degraded_message=state.degraded_message) + post_gate_input = { + "answer_mode": state.answer_mode, + "degraded_message": state.degraded_message, + "resolved_target": self._resolved_target(state), + "draft_answer_preview": draft.answer[:300], + "repair_candidate": bool(self._repair is not None), + } + started = perf_counter() + validation = self._post_gate.validate( + answer=draft.answer, + answer_mode=state.answer_mode, + degraded_message=state.degraded_message, + sub_intent=state.retrieval_request.sub_intent, + user_query=user_query, + evidence_pack=state.evidence_pack, + ) + timings_ms["post_evidence_gate"] = self._elapsed_ms(started) final_answer = draft.answer repair_used = False if not validation.passed and self._repair is not None: @@ -197,22 +276,40 @@ class CodeQaRuntimeExecutor: 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 + started = perf_counter() + validation = self._post_gate.validate( + answer=final_answer, + answer_mode=state.answer_mode, + degraded_message=state.degraded_message, + sub_intent=state.retrieval_request.sub_intent, + user_query=user_query, + evidence_pack=state.evidence_pack, + ) + timings_ms["post_evidence_gate_recheck"] = self._elapsed_ms(started) + if not validation.passed: + final_answer = self._fallback_answer(state) + state.answer_mode = self._fallback_mode(state) + post_gate_snapshot = { + "input": post_gate_input, + "output": { + "passed": validation.passed, + "action": validation.action, + "reasons": list(validation.reasons), + "repair_used": repair_used, + "final_answer_preview": final_answer[:300], + }, + } runtime_trace.append( { "step": "post_evidence_gate", "status": "passed" if validation.passed else "failed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": timings_ms["post_evidence_gate"], + "post_evidence_gate_recheck": timings_ms.get("post_evidence_gate_recheck", 0), "repair": timings_ms.get("repair", 0), }, - "output": { - "passed": validation.passed, - "reasons": list(validation.reasons), - "repair_used": repair_used, - }, + "input": post_gate_snapshot["input"], + "output": post_gate_snapshot["output"], } ) return self._finalize( @@ -224,6 +321,11 @@ class CodeQaRuntimeExecutor: validation=validation, timings_ms=timings_ms, runtime_trace=runtime_trace, + answer_policy_branch=answer_policy_branch, + decision_reason=decision_reason, + pre_gate_input=pre_gate_input, + gate_decision=gate_decision, + post_gate_snapshot=post_gate_snapshot, ) def _retrieve(self, state: CodeQaExecutionState) -> list[dict]: @@ -257,9 +359,10 @@ class CodeQaRuntimeExecutor: 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} + close = self._close_matches(candidates, found) + if close: + return {"status": "ambiguous", "resolved_symbol": None, "alternatives": close[:5], "confidence": 0.55} + return {"status": "not_found", "resolved_symbol": None, "alternatives": close[:5], "confidence": 0.0} def _finalize( self, @@ -272,6 +375,11 @@ class CodeQaRuntimeExecutor: validation=None, timings_ms: dict[str, int] | None = None, runtime_trace: list[dict] | None = None, + answer_policy_branch: str = "", + decision_reason: str = "", + pre_gate_input: dict | None = None, + gate_decision=None, + post_gate_snapshot: dict | None = None, ) -> CodeQaFinalResult: diagnostics = build_diagnostics_report( router_result=state.router_result, @@ -280,6 +388,11 @@ class CodeQaRuntimeExecutor: evidence_bundle=state.evidence_pack, answer_mode=state.answer_mode, timings_ms=timings_ms or {}, + resolved_target=self._resolved_target(state), + answer_policy_branch=answer_policy_branch, + decision_reason=decision_reason, + evidence_gate_input=pre_gate_input or {}, + post_evidence_gate=post_gate_snapshot or {}, ) result = CodeQaFinalResult( final_answer=final_answer.strip(), @@ -287,7 +400,15 @@ class CodeQaRuntimeExecutor: 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), + validation=validation + or self._post_gate.validate( + answer=final_answer, + answer_mode=state.answer_mode, + degraded_message=state.degraded_message, + sub_intent=state.retrieval_request.sub_intent if state.retrieval_request else "", + user_query=state.user_query, + evidence_pack=state.evidence_pack, + ), router_result=state.router_result, retrieval_request=state.retrieval_request, retrieval_result=state.retrieval_result, @@ -306,4 +427,119 @@ class CodeQaRuntimeExecutor: return result def _elapsed_ms(self, started: float) -> int: - return int((perf_counter() - started) * 1000) + return max(1, round((perf_counter() - started) * 1000)) + + def _build_pre_gate_input(self, state: CodeQaExecutionState) -> dict: + evidence = state.evidence_pack + retrieval = state.retrieval_result + return { + "resolved_target": self._resolved_target(state), + "sub_intent": state.retrieval_request.sub_intent if state.retrieval_request else None, + "target_type": evidence.target_type if evidence else None, + "evidence_count": evidence.evidence_count if evidence else 0, + "code_chunk_count": len(evidence.code_chunks) if evidence else 0, + "entrypoint_count": len(evidence.entrypoints) if evidence else 0, + "relation_count": len(evidence.relations) if evidence else 0, + "test_evidence_count": len(evidence.test_evidence) if evidence else 0, + "symbol_resolution_status": retrieval.symbol_resolution_status if retrieval else None, + "path_scope": list(state.retrieval_request.path_scope) if state.retrieval_request else [], + } + + def _resolved_target(self, state: CodeQaExecutionState) -> str | None: + if state.evidence_pack and state.evidence_pack.resolved_target: + return state.evidence_pack.resolved_target + if state.retrieval_result and state.retrieval_result.resolved_symbol: + return state.retrieval_result.resolved_symbol + if state.retrieval_request and state.retrieval_request.path_scope: + return state.retrieval_request.path_scope[0] + return None + + def _close_matches(self, candidates: list[str], found: list[str]) -> list[str]: + ranked: list[tuple[float, str]] = [] + for candidate in candidates: + for item in found: + score = SequenceMatcher(None, candidate.lower(), item.lower()).ratio() + if score >= 0.52: + ranked.append((score, item)) + ranked.sort(key=lambda pair: (-pair[0], pair[1])) + result: list[str] = [] + for _, item in ranked: + if item not in result: + result.append(item) + return result + + def _hydrate_entrypoint_sources( + self, + state: CodeQaExecutionState, + raw_rows: list[dict], + retrieval_report: dict, + ) -> tuple[list[dict], dict]: + if not state.retrieval_request or state.retrieval_request.sub_intent.upper() != "FIND_ENTRYPOINTS": + return raw_rows, retrieval_report + entrypoint_paths = [] + for row in raw_rows: + if str(row.get("layer") or "") != "C3_ENTRYPOINTS": + continue + path = str(row.get("path") or "").strip() + if path and path not in entrypoint_paths: + entrypoint_paths.append(path) + if not entrypoint_paths: + return raw_rows, retrieval_report + extra_rows = self._retrieval.retrieve_exact_files( + state.rag_session_id, + paths=entrypoint_paths[:3], + layers=["C0_SOURCE_CHUNKS"], + limit=24, + query=state.user_query, + ranking_profile="entrypoint_source_hydration", + ) + extra_report = self._retrieval.consume_retrieval_report() or {} + return self._merge_rows(raw_rows, extra_rows), self._merge_reports(retrieval_report, extra_report) + + def _merge_rows(self, base_rows: list[dict], extra_rows: list[dict]) -> list[dict]: + merged: list[dict] = [] + seen: set[tuple[str, str, str, int | None, int | None]] = set() + for row in [*base_rows, *extra_rows]: + key = ( + str(row.get("layer") or ""), + str(row.get("path") or ""), + str(row.get("title") or ""), + row.get("span_start"), + row.get("span_end"), + ) + if key in seen: + continue + seen.add(key) + merged.append(row) + return merged + + def _merge_reports(self, base: dict, extra: dict) -> dict: + merged = dict(base or {}) + merged["executed_layers"] = list(dict.fromkeys([*(base.get("executed_layers") or []), *(extra.get("executed_layers") or [])])) + merged["retrieval_mode_by_layer"] = {**dict(base.get("retrieval_mode_by_layer") or {}), **dict(extra.get("retrieval_mode_by_layer") or {})} + merged["top_k_by_layer"] = {**dict(base.get("top_k_by_layer") or {}), **dict(extra.get("top_k_by_layer") or {})} + merged["filters_by_layer"] = {**dict(base.get("filters_by_layer") or {}), **dict(extra.get("filters_by_layer") or {})} + merged["retrieval_by_layer_ms"] = {**dict(base.get("retrieval_by_layer_ms") or {}), **dict(extra.get("retrieval_by_layer_ms") or {})} + merged["fallback"] = dict(extra.get("fallback") or base.get("fallback") or {"used": False, "reason": None}) + merged["supplemental_requests"] = [*(base.get("supplemental_requests") or []), *(extra.get("requests") or [])] + return merged + + def _fallback_mode(self, state: CodeQaExecutionState) -> str: + status = str(state.router_result.symbol_resolution.status if state.router_result and state.router_result.symbol_resolution else "") + if status == "ambiguous": + return "ambiguous" + if status == "not_found": + return "not_found" + return "degraded" + + def _fallback_answer(self, state: CodeQaExecutionState) -> str: + symbol_resolution = state.router_result.symbol_resolution if state.router_result else None + query_plan = state.router_result.query_plan if state.router_result else None + target = next((item for item in list(query_plan.symbol_candidates or []) if item), "запрошенная сущность") if query_plan else "запрошенная сущность" + if symbol_resolution and symbol_resolution.status == "ambiguous": + return self._answer_policy.decide(router_result=state.router_result, gate_decision=evaluate_evidence(state.evidence_pack)).answer + if symbol_resolution and symbol_resolution.status == "not_found": + return self._answer_policy.decide(router_result=state.router_result, gate_decision=evaluate_evidence(state.evidence_pack)).answer + if state.degraded_message: + return state.degraded_message + return f"Недостаточно подтверждённых данных для уверенного ответа по {target}." diff --git a/src/app/modules/agent/code_qa_runtime/post_gate.py b/src/app/modules/agent/code_qa_runtime/post_gate.py index bcb0d30..a30e4d1 100644 --- a/src/app/modules/agent/code_qa_runtime/post_gate.py +++ b/src/app/modules/agent/code_qa_runtime/post_gate.py @@ -1,6 +1,25 @@ from __future__ import annotations +import re + from app.modules.agent.code_qa_runtime.models import CodeQaValidationResult +from app.modules.rag.code_qa_pipeline.answer_fact_curator import build_curated_answer_facts +from app.modules.rag.code_qa_pipeline.contracts import EvidenceBundle + +_TOKEN_RE = re.compile(r"[a-zA-Zа-яА-Я0-9_/]+") +_VAGUE_PHRASES = ( + "ряд аргументов", + "имеет responsibilities", + "имеет responsibility", + "ключевой компонент", + "центральный компонент", + "играет роль", + "управляет системой", + "этап пайплайна", + "инициализация сервисов", + "регистрация основных служб", +) +_OPTIMISTIC_TRACE_CLAIMS = ("полностью восстанавливается", "полный поток выполнения", "полностью прослеживается") class CodeQaPostEvidenceGate: @@ -10,6 +29,9 @@ class CodeQaPostEvidenceGate: answer: str, answer_mode: str, degraded_message: str, + sub_intent: str, + user_query: str, + evidence_pack: EvidenceBundle | None, ) -> CodeQaValidationResult: normalized = (answer or "").strip() if not normalized: @@ -18,6 +40,189 @@ class CodeQaPostEvidenceGate: 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 answer_mode == "ambiguous" and "не удалось однозначно разрешить" not in normalized.lower(): + return CodeQaValidationResult(passed=False, action="repair", reasons=["ambiguous_answer_missing_phrase"]) if degraded_message and answer_mode != "normal" and len(normalized) < 24: return CodeQaValidationResult(passed=False, action="repair", reasons=["answer_too_short"]) + if answer_mode != "normal" or evidence_pack is None: + return CodeQaValidationResult(passed=True, action="return") + + reasons = self._normal_answer_reasons(normalized.lower(), sub_intent.upper(), user_query, evidence_pack) + if reasons: + return CodeQaValidationResult(passed=False, action="repair", reasons=_dedupe(reasons)) return CodeQaValidationResult(passed=True, action="return") + + def _normal_answer_reasons(self, answer: str, sub_intent: str, user_query: str, evidence_pack: EvidenceBundle) -> list[str]: + reasons: list[str] = [] + if sub_intent == "FIND_ENTRYPOINTS": + reasons.extend(self._validate_entrypoints(answer, user_query, evidence_pack)) + elif sub_intent == "EXPLAIN": + reasons.extend(self._validate_explain(answer, evidence_pack)) + elif sub_intent == "ARCHITECTURE": + reasons.extend(self._validate_architecture(answer, evidence_pack)) + elif sub_intent == "TRACE_FLOW": + reasons.extend(self._validate_trace_flow(answer, evidence_pack)) + return reasons + + def _validate_entrypoints(self, answer: str, user_query: str, evidence_pack: EvidenceBundle) -> list[str]: + confirmed = [item for item in list(evidence_pack.entrypoints or []) if item.get("http_method") and item.get("route_path")] + if not confirmed: + return [] + query_tokens = self._tokens(user_query) + matched = [item for item in confirmed if self._tokens(str(item.get("route_path") or "")) & query_tokens] + required = matched or confirmed[:1] + reasons = [] + if any(f"{item['http_method']} {item['route_path']}".lower() not in answer for item in required): + reasons.append("missing_confirmed_route") + if matched and any(token in query_tokens for token in {"health", "/health"}) and "не обнаруж" in answer: + reasons.append("contradicts_confirmed_route") + return reasons + + def _validate_explain(self, answer: str, evidence_pack: EvidenceBundle) -> list[str]: + facts = build_curated_answer_facts(evidence_pack) + explain = dict(facts.get("explain") or {}) + reasons = self._validate_target_focus(answer, evidence_pack) + reasons.extend(self._vagueness_reasons(answer, "explain")) + + matches = 0 + methods = list(explain.get("required_methods") or []) + calls = list(explain.get("required_calls") or []) + dependencies = list(explain.get("required_dependencies") or []) + fields = list(explain.get("required_fields") or []) + if methods and not self._mentions_fact_group(answer, methods): + reasons.append("missing_concrete_methods") + elif methods: + matches += 1 + if calls and not self._mentions_fact_group(answer, calls): + reasons.append("missing_concrete_calls") + elif calls: + matches += 1 + if dependencies and not self._mentions_fact_group(answer, dependencies): + reasons.append("missing_concrete_dependencies") + elif dependencies: + matches += 1 + if fields and self._mentions_fact_group(answer, fields): + matches += 1 + if (methods or calls or dependencies or fields) and matches == 0: + reasons.append("too_vague_for_explain") + if self._semantic_leakage(answer, facts, has_concrete_support=matches > 0): + reasons.append("semantic_labels_without_code_edges") + return reasons + + def _validate_architecture(self, answer: str, evidence_pack: EvidenceBundle) -> list[str]: + facts = build_curated_answer_facts(evidence_pack) + architecture = dict(facts.get("architecture") or {}) + reasons = self._validate_target_focus(answer, evidence_pack) + reasons.extend(self._vagueness_reasons(answer, "architecture")) + + components = list(architecture.get("required_components") or []) + relations = list(architecture.get("required_relations") or []) + verbs = list(architecture.get("required_relation_verbs") or []) + if components and not self._mentions_fact_group(answer, components): + reasons.append("missing_concrete_components") + if relations and not self._mentions_relations(answer, relations): + reasons.append("missing_concrete_relations") + if verbs and not self._mentions_fact_group(answer, verbs): + reasons.append("missing_relation_verbs") + if any(label in answer for label in architecture.get("forbidden_labels") or []): + reasons.append("contains_retrieval_artifacts") + if self._methods_dominate_components(answer, components): + reasons.append("methods_as_primary_components") + if relations and (not self._mentions_relations(answer, relations) or not self._mentions_fact_group(answer, verbs)): + reasons.append("too_vague_for_architecture") + if self._semantic_leakage(answer, facts, has_concrete_support=self._mentions_relations(answer, relations)): + reasons.append("semantic_labels_without_code_edges") + return reasons + + def _validate_trace_flow(self, answer: str, evidence_pack: EvidenceBundle) -> list[str]: + facts = build_curated_answer_facts(evidence_pack) + trace = dict(facts.get("trace_flow") or {}) + reasons = self._validate_target_focus(answer, evidence_pack) + reasons.extend(self._vagueness_reasons(answer, "trace_flow")) + + steps = list(trace.get("required_flow_steps") or []) + calls = list(trace.get("required_calls") or []) + if steps and not self._mentions_steps(answer, steps): + reasons.append("missing_flow_steps") + if calls and not self._mentions_fact_group(answer, calls): + reasons.append("missing_concrete_calls") + if steps and not self._mentions_relations(answer, steps): + reasons.append("missing_sequence_edges") + if any(claim in answer for claim in _OPTIMISTIC_TRACE_CLAIMS): + reasons.append("overclaims_trace_completeness") + if steps and not (self._mentions_steps(answer, steps) and self._mentions_relations(answer, steps)): + reasons.append("too_vague_for_trace_flow") + return reasons + + def _validate_target_focus(self, answer: str, evidence_pack: EvidenceBundle) -> list[str]: + target = str(evidence_pack.resolved_target or "").strip().lower() + return [] if not target or target in answer else ["missing_resolved_target"] + + def _mentions_fact_group(self, answer: str, values: list[str]) -> bool: + return any(alias in answer for value in values for alias in _aliases(value)) + + def _mentions_relations(self, answer: str, relations: list[dict]) -> bool: + for relation in relations: + source = str(relation.get("source") or "").lower() + target = str(relation.get("target") or "").lower() + verb = str(relation.get("verb") or "").lower() + if source and target and source in answer and target in answer: + return True + if source and verb and target and source in answer and verb in answer and target in answer: + return True + return False + + def _mentions_steps(self, answer: str, steps: list[dict]) -> bool: + if "сначала" in answer and "затем" in answer: + return True + numeric_steps = sum(1 for marker in ("1.", "2.", "3.") if marker in answer) + if numeric_steps >= 2: + return True + mentioned = sum(1 for step in steps[:3] if self._mentions_relations(answer, [step])) + return mentioned >= min(2, len(steps[:3])) + + def _methods_dominate_components(self, answer: str, components: list[str]) -> bool: + method_like = re.findall(r"\b[a-z_]+\(\)", answer) + component_hits = sum(1 for component in components if component.lower() in answer) + return bool(method_like) and component_hits == 0 + + def _semantic_leakage(self, answer: str, facts: dict, *, has_concrete_support: bool) -> bool: + if has_concrete_support: + return False + semantic_roles = [str(item.get("role") or "").strip().lower() for item in facts.get("semantic_hints") or [] if str(item.get("role") or "").strip()] + return bool(semantic_roles) and any(role in answer for role in semantic_roles) + + def _vagueness_reasons(self, answer: str, scenario: str) -> list[str]: + if any(phrase in answer for phrase in _VAGUE_PHRASES): + return [f"too_vague_for_{scenario}"] + return [] + + def _tokens(self, value: str) -> set[str]: + return {token.lower().strip("/") for token in _TOKEN_RE.findall(value or "") if token.strip("/")} + + +def _aliases(value: str) -> list[str]: + text = str(value or "").strip().lower() + if not text: + return [] + aliases = [text] + bare = text.removesuffix("()") + if bare != text: + aliases.append(bare) + tail = bare.rsplit(".", 1)[-1] + if tail and tail not in aliases: + aliases.append(tail) + if tail and f"{tail}()" not in aliases: + aliases.append(f"{tail}()") + return aliases + + +def _dedupe(values: list[str]) -> list[str]: + seen: set[str] = set() + result: list[str] = [] + for value in values: + if value in seen: + continue + seen.add(value) + result.append(value) + return result 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 index 2711cd3..4e1fb31 100644 --- a/src/app/modules/agent/code_qa_runtime/prompt_payload_builder.py +++ b/src/app/modules/agent/code_qa_runtime/prompt_payload_builder.py @@ -1,6 +1,7 @@ from __future__ import annotations import json +import re from app.modules.rag.code_qa_pipeline.contracts import AnswerSynthesisInput, EvidenceBundle @@ -11,6 +12,7 @@ _LAYER_GUIDE = ( "- C3_ENTRYPOINTS: подтвержденные точки входа.\n" "- C4_SEMANTIC_ROLES: вспомогательная роль компонента, использовать осторожно." ) +_TOKEN_RE = re.compile(r"[a-zA-Zа-яА-Я0-9_/]+") class CodeQaPromptPayloadBuilder: @@ -30,8 +32,82 @@ class CodeQaPromptPayloadBuilder: "fast_context": synthesis_input.fast_context, "deep_context": synthesis_input.deep_context, "evidence_summary": synthesis_input.evidence_summary, + "semantic_hints": synthesis_input.semantic_hints, "diagnostic_hints": synthesis_input.diagnostic_hints, "retrieval_summary": evidence_pack.retrieval_summary, + "confirmed_entrypoints": self._entrypoints(user_query, evidence_pack), + "required_entrypoints": self._required_entrypoints(user_query, evidence_pack), "layer_guide": _LAYER_GUIDE, } + payload.update(self._scenario_payload(synthesis_input)) return json.dumps(payload, ensure_ascii=False, indent=2) + + def _entrypoints(self, user_query: str, evidence_pack: EvidenceBundle) -> list[dict]: + query_tokens = self._tokens(user_query) + enriched: list[dict] = [] + for item in list(evidence_pack.entrypoints or []): + route_path = str(item.get("route_path") or "").strip() + http_method = str(item.get("http_method") or "").strip().upper() + if not http_method: + continue + candidate = { + "http_method": http_method, + "route_path": route_path, + "display": f"{http_method} {route_path}".strip(), + "handler_symbol": str(item.get("handler_symbol") or "").strip(), + "path": str(item.get("path") or "").strip(), + "start_line": item.get("start_line"), + "end_line": item.get("end_line"), + "query_match": self._matches_query(route_path, query_tokens), + } + if candidate not in enriched: + enriched.append(candidate) + return sorted(enriched, key=lambda item: (-int(bool(item["query_match"])), -int(bool(item["route_path"])), len(item["route_path"] or "/"), item["display"])) + + def _required_entrypoints(self, user_query: str, evidence_pack: EvidenceBundle) -> list[str]: + return [item["display"] for item in self._entrypoints(user_query, evidence_pack) if item["query_match"] and item["route_path"]] + + def _scenario_payload(self, synthesis_input: AnswerSynthesisInput) -> dict: + scenario = (synthesis_input.resolved_scenario or "").upper() + curated = dict(synthesis_input.curated_facts or {}) + if scenario == "EXPLAIN": + facts = dict(curated.get("explain") or {}) + return { + "must_mention_methods": facts.get("required_methods", []), + "must_mention_fields": facts.get("required_fields", []), + "must_mention_calls": facts.get("required_calls", []), + "must_mention_dependencies": facts.get("required_dependencies", []), + "must_mention_constructor_args": facts.get("required_constructor_args", []), + "must_mention_files": facts.get("required_files", []), + "must_not_infer_missing_details": True, + "fact_gaps": facts.get("fact_gaps", []), + } + if scenario == "ARCHITECTURE": + facts = dict(curated.get("architecture") or {}) + return { + "must_mention_components": facts.get("required_components", []), + "must_mention_relations": facts.get("required_relations", []), + "must_use_relation_verbs": facts.get("required_relation_verbs", []), + "must_avoid_semantic_labels_as_primary_claims": True, + "must_not_use_retrieval_labels": facts.get("forbidden_labels", []), + "fact_gaps": facts.get("fact_gaps", []), + } + if scenario == "TRACE_FLOW": + facts = dict(curated.get("trace_flow") or {}) + return { + "must_mention_flow_steps": facts.get("required_flow_steps", []), + "must_mention_calls": facts.get("required_calls", []), + "must_mention_sequence_edges": facts.get("required_sequence_edges", []), + "must_avoid_overclaiming_full_flow": True, + "fact_gaps": facts.get("fact_gaps", []), + } + return {} + + def _matches_query(self, route_path: str, query_tokens: set[str]) -> bool: + if not route_path: + return False + path_tokens = self._tokens(route_path) + return bool(path_tokens & query_tokens) + + def _tokens(self, value: str) -> set[str]: + return {token.lower().strip("/") for token in _TOKEN_RE.findall(value or "") if token.strip("/")} diff --git a/src/app/modules/agent/code_qa_runtime/repair.py b/src/app/modules/agent/code_qa_runtime/repair.py index af8b39d..55eb6a7 100644 --- a/src/app/modules/agent/code_qa_runtime/repair.py +++ b/src/app/modules/agent/code_qa_runtime/repair.py @@ -17,10 +17,12 @@ class CodeQaAnswerRepairService: validation: CodeQaValidationResult, prompt_payload: str, ) -> str: + repair_focus = self._repair_focus(validation.reasons) repair_input = json.dumps( { "draft_answer": draft_answer, "validation_reasons": validation.reasons, + "repair_focus": repair_focus, "prompt_payload": prompt_payload, }, ensure_ascii=False, @@ -31,3 +33,24 @@ class CodeQaAnswerRepairService: repair_input, log_context="graph.project_qa.code_qa.repair", ).strip() + + def _repair_focus(self, reasons: list[str]) -> list[str]: + mapping = { + "missing_concrete_methods": "missing_concrete_methods", + "missing_concrete_calls": "missing_concrete_calls", + "missing_concrete_dependencies": "missing_concrete_dependencies", + "missing_concrete_components": "missing_concrete_components", + "missing_concrete_relations": "missing_concrete_relations", + "missing_relation_verbs": "missing_relation_verbs", + "missing_flow_steps": "missing_flow_steps", + "missing_sequence_edges": "missing_sequence_edges", + "too_vague_for_explain": "too_vague_for_explain", + "too_vague_for_architecture": "too_vague_for_architecture", + "too_vague_for_trace_flow": "too_vague_for_trace_flow", + "semantic_labels_without_code_edges": "semantic_labels_without_code_edges", + "contains_retrieval_artifacts": "contains_retrieval_artifacts", + "methods_as_primary_components": "methods_as_primary_components", + "overclaims_trace_completeness": "overclaims_trace_completeness", + } + result = [mapping[reason] for reason in reasons if reason in mapping] + return result or ["tighten_to_evidence"] diff --git a/src/app/modules/agent/code_qa_runtime/short_answer_formatter.py b/src/app/modules/agent/code_qa_runtime/short_answer_formatter.py new file mode 100644 index 0000000..7cdb83a --- /dev/null +++ b/src/app/modules/agent/code_qa_runtime/short_answer_formatter.py @@ -0,0 +1,33 @@ +from __future__ import annotations + + +class CodeQaShortAnswerFormatter: + def open_file_not_found(self, target: str) -> str: + return f"Файл {target} не найден." + + def entity_not_found(self, target: str, alternatives: list[str]) -> str: + base = f"Сущность {target} не найдена в доступном коде." + suffix = self._alternatives(alternatives) + return f"{base} {suffix}".strip() + + def entity_ambiguous(self, target: str, alternatives: list[str]) -> str: + base = f"Сущность {target} не удалось однозначно разрешить." + suffix = self._alternatives(alternatives) + return f"{base} {suffix}".strip() + + def insufficient(self, message: str) -> str: + normalized = (message or "").strip() + if normalized: + return normalized + return "Недостаточно подтверждённых данных для уверенного ответа." + + def related_only(self, target: str, alternatives: list[str]) -> str: + base = f"Прямых подтверждений для сущности {target} не найдено." + suffix = self._alternatives(alternatives) + return f"{base} {suffix}".strip() + + def _alternatives(self, alternatives: list[str]) -> str: + items = [item.strip() for item in alternatives if item and item.strip()] + if not items: + return "" + return f"Близкие варианты: {', '.join(items[:3])}." diff --git a/src/app/modules/agent/prompts/code_qa_architecture_answer.txt b/src/app/modules/agent/prompts/code_qa_architecture_answer.txt index d12911c..efe1ca8 100644 --- a/src/app/modules/agent/prompts/code_qa_architecture_answer.txt +++ b/src/app/modules/agent/prompts/code_qa_architecture_answer.txt @@ -17,9 +17,15 @@ Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. Дай архитектурное объяснение без лишней теории. -Назови подтверждённые компоненты и конкретные связи между ними: создаёт, вызывает, регистрирует, читает, пишет, передаёт, оборачивает. +Строй ответ вокруг concrete facts из payload: `must_mention_components`, `must_mention_relations`, `must_use_relation_verbs`. +Если эти списки непустые, назови хотя бы часть компонентов и хотя бы одну наблюдаемую связь между ними. +Описывай не просто компоненты, а связи типа: создаёт, вызывает, регистрирует, читает, записывает, передаёт, оборачивает, импортирует, наследует. +Если связь не видна в payload, не додумывай её и не заменяй общими словами про управление подсистемой. +Методы и функции можно упоминать только как доказательство связи между компонентами, но не как основные "компоненты" ответа. Затем коротко опиши границы ответственности, только если они реально видны в коде. Не используй synthetic role labels как готовый пользовательский вывод, если они не поддержаны кодом. Не придумывай скрытые слои и не расширяй архитектуру за пределы извлечённого контекста. Не используй обязательные markdown-секции. -Не используй абстрактные формулы вроде "главный компонент", "центральный управляющий компонент", "управляет потоками данных и состоянием системы", если конкретная связь не раскрыта через наблюдаемые методы, поля или вызовы. +Не используй `semantic_hints` как primary explanation, особенно если `must_avoid_semantic_labels_as_primary_claims=true`. +Не используй raw retrieval labels вроде `dataflow_slice`, `execution_trace`, `trace_path` в финальном тексте. +Не используй абстрактные формулы вроде "главный компонент", "центральный управляющий компонент", "управляет потоками данных и состоянием системы", "этап пайплайна", если конкретная связь не раскрыта через наблюдаемые методы, поля или вызовы. diff --git a/src/app/modules/agent/prompts/code_qa_explain_answer.txt b/src/app/modules/agent/prompts/code_qa_explain_answer.txt index 187c63d..d9e7fcb 100644 --- a/src/app/modules/agent/prompts/code_qa_explain_answer.txt +++ b/src/app/modules/agent/prompts/code_qa_explain_answer.txt @@ -18,9 +18,15 @@ Объясни, как работает сущность из вопроса пользователя, обычным инженерным текстом. Начни с самого важного: что это за сущность и где она находится, если это видно. -Затем кратко опиши подтверждённые зависимости, вызовы, аргументы, поля или шаги работы, только если они реально видны. +Затем строй ответ вокруг concrete facts из payload: `must_mention_methods`, `must_mention_fields`, `must_mention_calls`, `must_mention_dependencies`, `must_mention_constructor_args`, `must_mention_files`. +Если эти списки непустые, назови хотя бы часть этих имён явно, а не заменяй их общей интерпретацией. +Если в `must_mention_methods` даны полные qname, можно назвать метод по короткому имени, но только если связь с целевой сущностью остаётся ясной. +Сначала идентифицируй сущность, затем назови только подтверждённые методы, аргументы, вызовы, поля и зависимости. +Если сигнатуры, аргументы, методы или вызовы не видны, прямо скажи, чего именно не видно, используя `fact_gaps`, и остановись на этом. Не используй общие формулы без конкретных имён. Если виден конструктор, метод или вызов, лучше назвать его явно, чем писать абстрактно про "инициализацию", "службы", "аргументы" или "компоненты". Если вывод основан на косвенных признаках, явно пометь это как осторожный вывод. Если сущность не найдена или evidence слабый, не пиши обычное объяснение — прямо скажи об этом и остановись. +Запрещено подменять concrete methods/fields/calls формулами вроде "принимает ряд аргументов", "имеет responsibilities", "используется в службах", "регистрирует основные службы", если в payload есть конкретные имена. +Не используй `semantic_hints` как основной каркас ответа. Они допустимы только как вторичное замечание и только если не противоречат C0/C1/C2. Не используй обязательные секции и подзаголовки. 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 index 1a2be57..4f1bce3 100644 --- a/src/app/modules/agent/prompts/code_qa_find_entrypoints_answer.txt +++ b/src/app/modules/agent/prompts/code_qa_find_entrypoints_answer.txt @@ -19,6 +19,8 @@ Найди точки входа, обработчики запуска или важные entrypoints. Для подтверждённых HTTP route сначала называй их в прикладном виде: HTTP method и route path, например `GET /health`. Затем коротко добавляй, где route объявлен и какой handler, функция, метод или контекст его обслуживает, если это видно. +Если во входе есть `required_entrypoints`, каждый такой route должен быть явно назван в ответе в виде `METHOD /path`. +Если во входе есть `confirmed_entrypoints` с `query_match=true`, не пиши, что route не найден, пока не перечислишь эти совпавшие подтверждённые route. Подтверждённые entrypoints перечисляй первыми. Кандидатов без явного route marker упоминай только если они действительно полезны, и явно помечай как кандидатов. Не своди ответ к обсуждению декораторов вроде `@app.get`; пользователю важнее method, path и контекст. diff --git a/src/app/modules/agent/prompts/code_qa_repair_answer.txt b/src/app/modules/agent/prompts/code_qa_repair_answer.txt index 437b50d..ca3b60f 100644 --- a/src/app/modules/agent/prompts/code_qa_repair_answer.txt +++ b/src/app/modules/agent/prompts/code_qa_repair_answer.txt @@ -1,3 +1,9 @@ Ты исправляешь черновой ответ по коду после проверки groundedness. Сделай ответ короче, точнее и строже по evidence payload. Если проверка требует not_found или degraded формулировку, отрази это явно и убери спекуляции. +Если в `repair_focus` есть причины для `EXPLAIN`, перепиши ответ так, чтобы он назвал concrete methods, calls, fields, constructor args или dependencies из payload, а не общие responsibilities. +Если в `repair_focus` есть причины для `ARCHITECTURE`, перепиши ответ так, чтобы он назвал concrete components и связи с relation verbs из payload: создает, вызывает, читает, записывает, импортирует, наследует. +Если в `repair_focus` есть причины для `TRACE_FLOW`, перепиши ответ как последовательность concrete steps с явными methods/calls/edges из payload. Если виден только partial flow, так и скажи. +Если в `repair_focus` есть `semantic_labels_without_code_edges`, убери semantic role labels из основной формулировки, если они не подкреплены concrete code edges. +Если в `repair_focus` есть `contains_retrieval_artifacts` или `methods_as_primary_components`, убери raw retrieval labels и не выдавай методы за компоненты. +Если в `repair_focus` есть `overclaims_trace_completeness`, убери фразы про полный/полностью восстановленный flow, если payload не подтверждает это явно. 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 index 91be153..88c201c 100644 --- a/src/app/modules/agent/prompts/code_qa_trace_flow_answer.txt +++ b/src/app/modules/agent/prompts/code_qa_trace_flow_answer.txt @@ -17,7 +17,9 @@ Не выводи пустые разделы, пустые списки и формулировки вида "кандидатов нет", если это не помогает ответу. Проследи поток выполнения или поток данных по найденным артефактам. -Старайся описывать шаги последовательно и коротко, без лишних подзаголовков. +Строй ответ вокруг `must_mention_flow_steps`, `must_mention_calls` и `must_mention_sequence_edges` из payload. +Старайся описывать шаги последовательно и коротко, без лишних подзаголовков: сначала, затем, после этого, в конце. Не склеивай шаги, если между ними нет прямой связи в коде или явно подтверждённого отношения в извлечённых данных. -Если поток восстанавливается только частично, так и скажи. +Если поток восстанавливается только частично, так и скажи, опираясь на `fact_gaps`, и не заявляй, что flow восстановлен полностью. Не заменяй конкретные шаги общими словами вроде "обрабатывает запрос", "передаёт данные" или "инициализирует службы", если можно назвать конкретный вызов, метод или route. +Не используй сильные формулировки вроде "полностью восстанавливается", "полный поток виден", если payload показывает только часть цепочки. diff --git a/src/app/modules/rag/code_qa_pipeline/answer_fact_curator.py b/src/app/modules/rag/code_qa_pipeline/answer_fact_curator.py new file mode 100644 index 0000000..59038db --- /dev/null +++ b/src/app/modules/rag/code_qa_pipeline/answer_fact_curator.py @@ -0,0 +1,300 @@ +from __future__ import annotations + +import re +from typing import Any + +from app.modules.rag.code_qa_pipeline.contracts import CodeChunkItem, EvidenceBundle + +_CALL_RE = re.compile(r"([A-Za-z_][\w\.]*)\s*\(") +_FIELD_RE = re.compile(r"self\.(\w+)") +_SIGNATURE_RE = re.compile(r"(?P[A-Za-z_][\w\.]*)\((?P[^)]*)\)") +_RETRIEVAL_LABELS = ("dataflow_slice", "execution_trace", "trace_path") +_RELATION_VERBS = { + "calls": "вызывает", + "instantiates": "создает", + "inherits": "наследует", + "imports": "импортирует", + "reads_attr": "читает", + "writes_attr": "записывает", +} + + +def build_curated_answer_facts(bundle: EvidenceBundle) -> dict[str, Any]: + target = str(bundle.resolved_target or "").strip() + semantic_hints = _semantic_hints(bundle.code_chunks) + primary_chunks = [chunk for chunk in bundle.code_chunks if chunk.layer != "C4_SEMANTIC_ROLES"] + relations = _normalized_relations(bundle.relations) + target_relations = [relation for relation in relations if _is_target_relation(relation, target)] + + return { + "scenario": (bundle.resolved_sub_intent or "EXPLAIN").upper(), + "semantic_hints": semantic_hints, + "primary_chunk_count": len(primary_chunks), + "relation_count": len(relations), + "explain": _explain_facts(bundle, primary_chunks, target_relations), + "architecture": _architecture_facts(bundle, primary_chunks, target_relations), + "trace_flow": _trace_flow_facts(bundle, primary_chunks, target_relations), + } + + +def _explain_facts(bundle: EvidenceBundle, chunks: list[CodeChunkItem], relations: list[dict[str, Any]]) -> dict[str, Any]: + target = str(bundle.resolved_target or "").strip() + signatures = [_signature_payload(chunk) for chunk in chunks if chunk.layer == "C1_SYMBOL_CATALOG"] + target_signatures = [item for item in signatures if _is_target_symbol(item["name"], target)] + methods = _unique(item["name"] for item in target_signatures if item["kind"] == "method") + constructor_args = _unique( + arg + for item in target_signatures + if item["name"].endswith(".__init__") + for arg in item["args"] + if arg not in {"self", "cls"} + ) + calls = _unique( + _display_call_target(relation["target"]) + for relation in relations + if relation["edge_type"] in {"calls", "instantiates"} + ) + if not calls: + calls = _fallback_calls(chunks, target) + fields = _unique( + relation["target"].split(".", 1)[-1] + for relation in relations + if relation["edge_type"] in {"reads_attr", "writes_attr"} + ) + if not fields: + fields = _unique(field for chunk in chunks if _chunk_matches_target(chunk, target) for field in _FIELD_RE.findall(chunk.content or "")) + dependencies = _unique( + _display_dependency_target(relation["target"]) + for relation in relations + if relation["edge_type"] in {"imports", "instantiates"} + ) + required_files = _unique(chunk.path for chunk in chunks if _chunk_matches_target(chunk, target) and chunk.path) + required_symbols = _unique(item["name"] for item in target_signatures if item["name"]) or _unique([target] if target else bundle.target_symbol_candidates) + + fact_gaps: list[str] = [] + if not methods: + fact_gaps.append("Методы целевой сущности не подтверждены в извлеченных C0/C1 данных.") + if not calls: + fact_gaps.append("Конкретные вызовы целевой сущности не подтверждены в C2/C0.") + if not dependencies: + fact_gaps.append("Явные зависимости целевой сущности не подтверждены.") + + return { + "required_symbols": required_symbols[:8], + "required_methods": methods[:6], + "required_calls": calls[:6], + "required_fields": fields[:6], + "required_constructor_args": constructor_args[:6], + "required_dependencies": dependencies[:6], + "required_files": required_files[:4], + "fact_gaps": fact_gaps, + } + + +def _architecture_facts(bundle: EvidenceBundle, chunks: list[CodeChunkItem], relations: list[dict[str, Any]]) -> dict[str, Any]: + target = str(bundle.resolved_target or "").strip() + components = _unique( + ([target] if target else []) + + [_component_name(relation["source"]) for relation in relations] + + [_component_name(relation["target"]) for relation in relations] + + [_component_name(chunk.title) for chunk in chunks if _chunk_matches_target(chunk, target)] + ) + relation_rows = [ + { + "source": _component_name(relation["source"]), + "verb": relation["verb"], + "target": _component_name(relation["target"]), + "source_method": relation["source"], + "target_method": relation["target"], + "path": relation["path"], + "line_span": relation["line_span"], + "edge_type": relation["edge_type"], + } + for relation in relations + if _component_name(relation["source"]) and _component_name(relation["target"]) + ] + relation_rows = [row for row in relation_rows if row["source"] != row["target"]] + relation_verbs = _unique(row["verb"] for row in relation_rows if row["verb"]) + fact_gaps: list[str] = [] + if not relation_rows: + fact_gaps.append("Concrete code edges между компонентами не подтверждены.") + + return { + "required_components": components[:8], + "required_relations": relation_rows[:8], + "required_relation_verbs": relation_verbs[:6], + "required_creation_edges": [row for row in relation_rows if row["edge_type"] == "instantiates"][:4], + "required_call_edges": [row for row in relation_rows if row["edge_type"] == "calls"][:4], + "required_registration_edges": [row for row in relation_rows if row["edge_type"] == "imports"][:4], + "required_data_edges": [row for row in relation_rows if row["edge_type"] in {"reads_attr", "writes_attr"}][:4], + "fact_gaps": fact_gaps, + "forbidden_labels": list(_RETRIEVAL_LABELS), + } + + +def _trace_flow_facts(bundle: EvidenceBundle, chunks: list[CodeChunkItem], relations: list[dict[str, Any]]) -> dict[str, Any]: + target = str(bundle.resolved_target or "").strip() + flow_steps = [ + { + "step": index, + "source": relation["source"], + "verb": relation["verb"], + "target": relation["target"], + "path": relation["path"], + "line_span": relation["line_span"], + } + for index, relation in enumerate(sorted(relations, key=lambda item: (item["path"], item["sort_line"], item["source"], item["target"])), start=1) + ] + fact_gaps: list[str] = [] + if len(flow_steps) < 2: + fact_gaps.append("Полная последовательность шагов не подтверждена; виден только частичный flow.") + if not flow_steps: + fact_gaps.append("Конкретные sequence edges для flow не подтверждены.") + + return { + "required_flow_steps": flow_steps[:8], + "required_calls": _unique(_display_call_target(item["target"]) for item in flow_steps), + "required_sequence_edges": flow_steps[:8], + "required_files": _unique(chunk.path for chunk in chunks if _chunk_matches_target(chunk, target) and chunk.path)[:4], + "fact_gaps": fact_gaps, + } + + +def _semantic_hints(chunks: list[CodeChunkItem]) -> list[dict[str, Any]]: + hints: list[dict[str, Any]] = [] + for chunk in chunks: + if chunk.layer != "C4_SEMANTIC_ROLES": + continue + meta = dict(chunk.metadata or {}) + hints.append( + { + "symbol": meta.get("symbol_name") or chunk.title, + "role": meta.get("role"), + "path": chunk.path, + "confidence": meta.get("confidence"), + } + ) + return hints[:8] + + +def _normalized_relations(relations: list[dict[str, Any]]) -> list[dict[str, Any]]: + normalized: list[dict[str, Any]] = [] + for relation in relations: + metadata = dict(relation.get("metadata") or {}) + edge_type = str(metadata.get("edge_type") or relation.get("edge_type") or "").strip() + source = _clean_endpoint(str(metadata.get("src_qname") or relation.get("source") or "").strip()) + target = _clean_endpoint(str(metadata.get("dst_ref") or relation.get("target") or "").strip()) + if not edge_type or not source or not target: + continue + normalized.append( + { + "edge_type": edge_type, + "source": source, + "target": target, + "verb": _RELATION_VERBS.get(edge_type, edge_type), + "path": str(relation.get("path") or ""), + "line_span": _line_span(relation), + "sort_line": int(relation.get("start_line") or 0), + } + ) + return normalized + + +def _signature_payload(chunk: CodeChunkItem) -> dict[str, Any]: + meta = dict(chunk.metadata or {}) + signature = str(meta.get("signature") or chunk.content or "").strip() + match = _SIGNATURE_RE.search(signature) + args = [part.strip() for part in match.group("args").split(",") if part.strip()] if match else [] + return { + "name": _clean_endpoint(str(meta.get("qname") or chunk.title or "").strip()), + "kind": str(meta.get("kind") or "").strip(), + "args": args, + } + + +def _fallback_calls(chunks: list[CodeChunkItem], target: str) -> list[str]: + values: list[str] = [] + for chunk in chunks: + if not _chunk_matches_target(chunk, target): + continue + values.extend(_display_call_target(item) for item in _CALL_RE.findall(chunk.content or "")) + return _unique(values) + + +def _chunk_matches_target(chunk: CodeChunkItem, target: str) -> bool: + if not target: + return True + title = _clean_endpoint(chunk.title) + symbol = _clean_endpoint(str(dict(chunk.metadata or {}).get("qname") or "")) + return _is_target_symbol(title, target) or _is_target_symbol(symbol, target) or target.lower() in (chunk.content or "").lower() + + +def _is_target_relation(relation: dict[str, Any], target: str) -> bool: + if not target: + return True + return _is_target_symbol(relation["source"], target) or _component_name(relation["source"]) == target or _component_name(relation["target"]) == target + + +def _is_target_symbol(name: str, target: str) -> bool: + clean_name = _clean_endpoint(name) + clean_target = _clean_endpoint(target) + if not clean_target: + return True + return clean_name == clean_target or clean_name.startswith(f"{clean_target}.") + + +def _component_name(value: str) -> str: + clean = _clean_endpoint(value) + if not clean: + return "" + parts = clean.split(".") + if len(parts) <= 1: + return clean + if len(parts) == 2: + return clean if parts[1][:1].isupper() else parts[0] + return ".".join(parts[:-1]) + + +def _display_call_target(value: str) -> str: + clean = _clean_endpoint(value) + if not clean: + return "" + tail = clean.rsplit(".", 1)[-1] + return f"{tail}()" if tail and tail != clean else clean + + +def _display_dependency_target(value: str) -> str: + clean = _clean_endpoint(value) + if not clean: + return "" + return _component_name(clean) or clean + + +def _clean_endpoint(value: str) -> str: + clean = str(value or "").strip() + if not clean: + return "" + for label in _RETRIEVAL_LABELS: + clean = clean.replace(f".{label}", "") + clean = clean.replace(label, "") + return clean.strip(".: ") + + +def _line_span(item: dict[str, Any]) -> str: + start = item.get("start_line") + end = item.get("end_line") + if start is None and end is None: + return "?:?" + return f"{start or '?'}-{end or '?'}" + + +def _unique(values: Any) -> list[str]: + seen: set[str] = set() + result: list[str] = [] + for value in values: + text = str(value or "").strip() + if not text or text in seen: + continue + seen.add(text) + result.append(text) + return result diff --git a/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py b/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py index 4da24fb..0ce308a 100644 --- a/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py +++ b/src/app/modules/rag/code_qa_pipeline/answer_synthesis.py @@ -2,6 +2,7 @@ from __future__ import annotations +from app.modules.rag.code_qa_pipeline.answer_fact_curator import build_curated_answer_facts from app.modules.rag.code_qa_pipeline.contracts import AnswerSynthesisInput, EvidenceBundle @@ -13,11 +14,16 @@ def build_answer_synthesis_input( scenario = bundle.resolved_sub_intent or "EXPLAIN" target = bundle.resolved_target sufficient = bundle.sufficient + curated = build_curated_answer_facts(bundle) + semantic_hints = list(curated.get("semantic_hints") or []) fast_lines = [ f"Scenario: {scenario}", f"Target: {target or 'none'}", f"Evidence chunks: {bundle.evidence_count}", + f"Primary chunks: {curated.get('primary_chunk_count', 0)}", + f"Semantic hints: {len(semantic_hints)}", + f"Relations: {curated.get('relation_count', 0)}", f"Sufficient: {sufficient}", ] if bundle.failure_reasons: @@ -25,18 +31,21 @@ def build_answer_synthesis_input( fast_context = "\n".join(fast_lines) deep_parts = [] - for i, c in enumerate(bundle.code_chunks[:30], 1): + primary_chunks = [chunk for chunk in bundle.code_chunks if scenario.upper() not in {"EXPLAIN", "ARCHITECTURE"} or chunk.layer != "C4_SEMANTIC_ROLES"] + for i, c in enumerate(primary_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]: + for c in primary_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 semantic_hints: + evidence_summary.append({"kind": "semantic_hints", "count": len(semantic_hints)}) if bundle.entrypoints: evidence_summary.append({"kind": "entrypoints", "count": len(bundle.entrypoints)}) if bundle.test_evidence: @@ -45,6 +54,9 @@ def build_answer_synthesis_input( 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'])}") + scenario_key = scenario.lower() + scenario_facts = dict(curated.get(scenario_key) or {}) + hints.extend(list(scenario_facts.get("fact_gaps") or [])) return AnswerSynthesisInput( user_question=user_question, @@ -53,6 +65,8 @@ def build_answer_synthesis_input( fast_context=fast_context, deep_context=deep_context, evidence_summary=evidence_summary, + semantic_hints=semantic_hints, + curated_facts=curated, 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 index 0ffe729..0fa3253 100644 --- a/src/app/modules/rag/code_qa_pipeline/contracts.py +++ b/src/app/modules/rag/code_qa_pipeline/contracts.py @@ -98,6 +98,7 @@ class RetrievalResult(BaseModel): 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) + semantic_hints: 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) @@ -138,6 +139,8 @@ class AnswerSynthesisInput(BaseModel): fast_context: str = "" deep_context: str = "" evidence_summary: list[dict[str, Any]] = Field(default_factory=list) + semantic_hints: list[dict[str, Any]] = Field(default_factory=list) + curated_facts: dict[str, Any] = Field(default_factory=dict) evidence_sufficient: bool = False diagnostic_hints: list[str] = Field(default_factory=list) 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 index 71b87af..7c8841d 100644 --- a/src/app/modules/rag/code_qa_pipeline/evidence_bundle_builder.py +++ b/src/app/modules/rag/code_qa_pipeline/evidence_bundle_builder.py @@ -28,6 +28,7 @@ def build_evidence_bundle( summary = { "chunk_count": len(retrieval_result.code_chunks), "relation_count": len(retrieval_result.relations), + "semantic_hint_count": len(retrieval_result.semantic_hints), "entrypoint_count": len(retrieval_result.entrypoints), "test_candidate_count": len(retrieval_result.test_candidates), "layers_with_hits": [ 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 index 75d892f..fb19c1f 100644 --- a/src/app/modules/rag/code_qa_pipeline/retrieval_result_builder.py +++ b/src/app/modules/rag/code_qa_pipeline/retrieval_result_builder.py @@ -2,13 +2,14 @@ from __future__ import annotations -from app.modules.rag.code_qa_pipeline.contracts import ( - CodeChunkItem, - LayerOutcome, - RetrievalResult, -) +import re + +from app.modules.rag.code_qa_pipeline.contracts import CodeChunkItem, LayerOutcome, RetrievalResult from app.modules.rag.retrieval.test_filter import is_test_path +_ROUTE_RE = re.compile(r'@[\w\.]+\.(get|post|put|delete|patch|options|head)\(\s*["\']([^"\']+)["\']') +_DEF_RE = re.compile(r"async\s+def\s+(\w+)|def\s+(\w+)") + def build_retrieval_result( raw_rows: list[dict], @@ -21,52 +22,210 @@ def build_retrieval_result( layers_seen: set[str] = set() code_chunks: list[CodeChunkItem] = [] relations: list[dict] = [] - entrypoints: list[dict] = [] + semantic_hints: list[dict] = [] + entrypoint_rows: list[CodeChunkItem] = [] 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 "") + chunk = _to_chunk(row) + layer = chunk.layer + path = chunk.path 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() + title = chunk.title.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): + continue + if layer == "C2_DEPENDENCY_GRAPH": + relations.append(_relation_payload(chunk)) + continue + if layer == "C4_SEMANTIC_ROLES": + semantic_hints.append(_semantic_hint_payload(chunk)) + continue + if layer == "C3_ENTRYPOINTS": + entrypoint_rows.append(chunk) + continue + if is_test_path(path): test_candidates.append({"path": path, "title": chunk.title, "content": chunk.content[:300]}) + entrypoints = _normalize_entrypoints(entrypoint_rows, code_chunks) executed = list(report.get("executed_layers") or []) missing_layers = [lid for lid in executed if lid not in layers_seen] + layer_outcomes = _layer_outcomes(raw_rows, executed, layers_seen, report) + + 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, + semantic_hints=semantic_hints, + entrypoints=entrypoints, + test_candidates=test_candidates, + layer_outcomes=layer_outcomes, + missing_layers=missing_layers, + raw_rows=raw_rows, + retrieval_report=report, + ) + + +def _to_chunk(row: dict) -> CodeChunkItem: + return CodeChunkItem( + layer=str(row.get("layer") or ""), + path=str(row.get("path") or ""), + 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 {}), + ) + + +def _normalize_entrypoints(entrypoint_rows: list[CodeChunkItem], code_chunks: list[CodeChunkItem]) -> list[dict]: + chunks_by_path: dict[str, list[CodeChunkItem]] = {} + for chunk in code_chunks: + chunks_by_path.setdefault(chunk.path, []).append(chunk) + + normalized: list[dict] = [] + seen: set[tuple[str, str, str, int | None, int | None]] = set() + for chunk in entrypoint_rows: + item = _entrypoint_payload(chunk, chunks_by_path.get(chunk.path, [])) + key = ( + str(item.get("http_method") or ""), + str(item.get("route_path") or ""), + str(item.get("path") or ""), + chunk.start_line, + chunk.end_line, + ) + if key in seen: + continue + seen.add(key) + normalized.append(item) + return sorted(normalized, key=_entrypoint_sort_key) + + +def _relation_payload(chunk: CodeChunkItem) -> dict: + metadata = dict(chunk.metadata or {}) + edge_type = str(metadata.get("edge_type") or "").strip() + src_qname = str(metadata.get("src_qname") or "").strip() + dst_ref = str(metadata.get("dst_ref") or "").strip() + return { + "path": chunk.path, + "start_line": chunk.start_line, + "end_line": chunk.end_line, + "edge_type": edge_type, + "source": src_qname, + "target": dst_ref, + "source_component": _component_name(src_qname), + "target_component": _component_name(dst_ref), + "has_retrieval_label": "dataflow_slice" in dst_ref or "dataflow_slice" in src_qname, + "metadata": metadata, + "content": chunk.content[:500], + } + + +def _semantic_hint_payload(chunk: CodeChunkItem) -> dict: + metadata = dict(chunk.metadata or {}) + return { + "path": chunk.path, + "title": chunk.title, + "symbol": metadata.get("symbol_name") or chunk.title, + "role": metadata.get("role"), + "confidence": metadata.get("confidence"), + "content": chunk.content[:300], + } + + +def _component_name(value: str) -> str: + cleaned = str(value or "").replace(".dataflow_slice", "").strip(". ") + if "." not in cleaned: + return cleaned + head, tail = cleaned.rsplit(".", 1) + return head if tail and not tail[:1].isupper() else cleaned + + +def _entrypoint_payload(chunk: CodeChunkItem, siblings: list[CodeChunkItem]) -> dict: + methods = [str(item).strip().upper() for item in list(dict(chunk.metadata).get("lang_payload", {}).get("methods", [])) if str(item).strip()] + method = methods[0] if methods else "" + route_path = _infer_route_path(chunk, siblings) + handler_symbol = _infer_handler_symbol(chunk, siblings) + return { + "path": chunk.path, + "title": chunk.title, + "start_line": chunk.start_line, + "end_line": chunk.end_line, + "http_method": method, + "route_path": route_path, + "handler_symbol": handler_symbol, + "handler_symbol_id": dict(chunk.metadata).get("handler_symbol_id"), + "route_or_command": dict(chunk.metadata).get("route_or_command"), + "metadata": chunk.metadata, + } + + +def _infer_route_path(chunk: CodeChunkItem, siblings: list[CodeChunkItem]) -> str: + for candidate in siblings: + if candidate.layer != "C0_SOURCE_CHUNKS": + continue + match = _ROUTE_RE.search(_window_text(candidate, chunk.start_line)) + if match: + return match.group(2).strip() + return "" + + +def _infer_handler_symbol(chunk: CodeChunkItem, siblings: list[CodeChunkItem]) -> str: + for candidate in siblings: + if candidate.layer != "C0_SOURCE_CHUNKS": + continue + match = _DEF_RE.search(_window_text(candidate, chunk.start_line, before=2, after=12)) + if match: + return match.group(1) or match.group(2) or "" + return "" + + +def _window_text(chunk: CodeChunkItem, target_line: int | None, *, before: int = 6, after: int = 8) -> str: + text = chunk.content or "" + if not text or not target_line or not chunk.start_line: + return text + lines = text.splitlines() + offset = max(0, target_line - chunk.start_line - before) + end = min(len(lines), target_line - chunk.start_line + after) + if offset >= end: + return text + return "\n".join(lines[offset:end]) + + +def _entrypoint_sort_key(item: dict) -> tuple[int, int, str, str, int]: + route_path = str(item.get("route_path") or "") + method = str(item.get("http_method") or "") + score = 0 + if route_path: + score += 3 + if route_path and route_path != "/": + score += 3 + if method: + score += 1 + return (-score, len(route_path or "zzzz"), method, str(item.get("path") or ""), int(item.get("start_line") or 0)) + + +def _layer_outcomes(raw_rows: list[dict], executed: list[str], layers_seen: set[str], report: dict) -> list[LayerOutcome]: 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) - ), + fallback_used=bool((report.get("fallback") or {}).get("used") and report.get("retrieval_mode_by_layer", {}).get(layer_id)), ) for layer_id in executed ] @@ -80,21 +239,4 @@ def build_retrieval_result( 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, - ) + return layer_outcomes diff --git a/src/app/modules/shared/gigachat/settings.py b/src/app/modules/shared/gigachat/settings.py index 026515c..654a9f6 100644 --- a/src/app/modules/shared/gigachat/settings.py +++ b/src/app/modules/shared/gigachat/settings.py @@ -20,6 +20,6 @@ class GigaChatSettings: scope=os.getenv("GIGACHAT_SCOPE", "GIGACHAT_API_PERS"), credentials=os.getenv("GIGACHAT_TOKEN", "").strip(), ssl_verify=os.getenv("GIGACHAT_SSL_VERIFY", "true").lower() in {"1", "true", "yes"}, - model=os.getenv("GIGACHAT_MODEL", "GigaChat"), + model=os.getenv("GIGACHAT_MODEL", "GigaChat-Pro"), embedding_model=os.getenv("GIGACHAT_EMBEDDING_MODEL", "Embeddings"), ) diff --git a/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_code_qa_answer_boundary.py b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_code_qa_answer_boundary.py new file mode 100644 index 0000000..13e6709 --- /dev/null +++ b/tests/pipeline_setup/suite_02_pipeline/pipeline_intent_rag/test_code_qa_answer_boundary.py @@ -0,0 +1,323 @@ +from __future__ import annotations + +import json + +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.rag.code_qa_pipeline.answer_synthesis import build_answer_synthesis_input +from app.modules.rag.code_qa_pipeline.contracts import CodeChunkItem, EvidenceBundle +from app.modules.rag.code_qa_pipeline.retrieval_result_builder import build_retrieval_result + + +def test_retrieval_result_separates_semantic_hints_and_relations() -> None: + raw = [ + { + "layer": "C2_DEPENDENCY_GRAPH", + "path": "src/runtime.py", + "content": "RuntimeManager calls TraceService", + "span_start": 10, + "span_end": 10, + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.record"}, + }, + { + "layer": "C4_SEMANTIC_ROLES", + "path": "src/runtime.py", + "title": "RuntimeManager", + "content": "role: orchestrator", + "span_start": 1, + "span_end": 20, + "metadata": {"symbol_name": "RuntimeManager", "role": "orchestrator", "confidence": 0.7}, + }, + ] + result = build_retrieval_result(raw, {"executed_layers": ["C2_DEPENDENCY_GRAPH", "C4_SEMANTIC_ROLES"]}, {"status": "resolved"}) + assert result.relations[0]["edge_type"] == "calls" + assert result.relations[0]["source"] == "RuntimeManager.start" + assert result.semantic_hints[0]["role"] == "orchestrator" + + +def test_answer_synthesis_curates_explain_facts_and_demotes_c4() -> None: + bundle = EvidenceBundle( + resolved_sub_intent="EXPLAIN", + resolved_target="RuntimeManager", + target_type="symbol", + evidence_count=4, + sufficient=True, + code_chunks=[ + CodeChunkItem( + layer="C1_SYMBOL_CATALOG", + path="src/runtime.py", + title="RuntimeManager.__init__", + content="__init__(self, tracer, registry)", + start_line=1, + end_line=3, + metadata={"qname": "RuntimeManager.__init__", "kind": "method", "signature": "__init__(self, tracer, registry)"}, + ), + CodeChunkItem( + layer="C0_SOURCE_CHUNKS", + path="src/runtime.py", + title="", + content="self.tracer = tracer\nself.registry = registry\nself.tracer.record()\n", + start_line=1, + end_line=4, + metadata={}, + ), + CodeChunkItem( + layer="C4_SEMANTIC_ROLES", + path="src/runtime.py", + title="RuntimeManager", + content="role: orchestrator", + start_line=1, + end_line=4, + metadata={"symbol_name": "RuntimeManager", "role": "orchestrator"}, + ), + ], + relations=[ + { + "path": "src/runtime.py", + "start_line": 3, + "end_line": 3, + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.__init__", "dst_ref": "self.tracer.record"}, + } + ], + ) + synthesis = build_answer_synthesis_input("Explain RuntimeManager", bundle) + explain = synthesis.curated_facts["explain"] + assert "RuntimeManager.__init__" in explain["required_methods"] + assert "tracer" in explain["required_constructor_args"] + assert "record" in synthesis.deep_context or "self.tracer.record" in json.dumps(explain) + assert "orchestrator" not in synthesis.deep_context + assert synthesis.semantic_hints[0]["role"] == "orchestrator" + + +def test_prompt_payload_builder_adds_explain_constraints() -> None: + bundle = EvidenceBundle(resolved_sub_intent="EXPLAIN", resolved_target="RuntimeManager") + synthesis = build_answer_synthesis_input( + "Explain RuntimeManager", + EvidenceBundle( + resolved_sub_intent="EXPLAIN", + resolved_target="RuntimeManager", + code_chunks=[ + CodeChunkItem( + layer="C1_SYMBOL_CATALOG", + path="src/runtime.py", + title="RuntimeManager.start", + content="start(self)", + metadata={"qname": "RuntimeManager.start", "kind": "method", "signature": "start(self)"}, + ) + ], + evidence_count=1, + ), + ) + payload = json.loads( + CodeQaPromptPayloadBuilder().build( + user_query="Explain RuntimeManager", + synthesis_input=synthesis, + evidence_pack=bundle, + answer_mode="normal", + ) + ) + assert "must_mention_methods" in payload + assert "RuntimeManager.start" in payload["must_mention_methods"] + assert payload["must_not_infer_missing_details"] is True + + +def test_prompt_payload_builder_adds_trace_flow_constraints() -> None: + synthesis = build_answer_synthesis_input( + "Trace RuntimeManager", + EvidenceBundle( + resolved_sub_intent="TRACE_FLOW", + resolved_target="RuntimeManager", + relations=[ + { + "path": "src/runtime.py", + "start_line": 10, + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.record"}, + }, + { + "path": "src/runtime.py", + "start_line": 11, + "metadata": {"edge_type": "calls", "src_qname": "TraceService.record", "dst_ref": "Registry.register"}, + }, + ], + evidence_count=2, + ), + ) + payload = json.loads( + CodeQaPromptPayloadBuilder().build( + user_query="Trace RuntimeManager", + synthesis_input=synthesis, + evidence_pack=EvidenceBundle(resolved_sub_intent="TRACE_FLOW", resolved_target="RuntimeManager"), + answer_mode="normal", + ) + ) + assert payload["must_mention_flow_steps"] + assert payload["must_avoid_overclaiming_full_flow"] is True + + +def test_post_gate_rejects_vague_explain_without_concrete_facts() -> None: + bundle = EvidenceBundle( + resolved_sub_intent="EXPLAIN", + resolved_target="RuntimeManager", + evidence_count=3, + code_chunks=[ + CodeChunkItem( + layer="C1_SYMBOL_CATALOG", + path="src/runtime.py", + title="RuntimeManager.start", + content="start(self)", + metadata={"qname": "RuntimeManager.start", "kind": "method", "signature": "start(self)"}, + ) + ], + relations=[ + { + "path": "src/runtime.py", + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.record"}, + } + ], + ) + result = CodeQaPostEvidenceGate().validate( + answer="RuntimeManager имеет responsibilities и управляет системой.", + answer_mode="normal", + degraded_message="", + sub_intent="EXPLAIN", + user_query="Explain RuntimeManager", + evidence_pack=bundle, + ) + assert result.passed is False + assert "missing_concrete_methods" in result.reasons + assert "too_vague_for_explain" in result.reasons + + +def test_post_gate_accepts_explain_with_method_alias_and_call() -> None: + bundle = EvidenceBundle( + resolved_sub_intent="EXPLAIN", + resolved_target="RuntimeManager", + evidence_count=3, + code_chunks=[ + CodeChunkItem( + layer="C1_SYMBOL_CATALOG", + path="src/runtime.py", + title="RuntimeManager.start", + content="start(self)", + metadata={"qname": "RuntimeManager.start", "kind": "method", "signature": "start(self)"}, + ) + ], + relations=[ + { + "path": "src/runtime.py", + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.record"}, + } + ], + ) + result = CodeQaPostEvidenceGate().validate( + answer="RuntimeManager запускает работу через метод start(), а затем вызывает record() у TraceService.", + answer_mode="normal", + degraded_message="", + sub_intent="EXPLAIN", + user_query="Explain RuntimeManager", + evidence_pack=bundle, + ) + assert result.passed is True + + +def test_post_gate_requires_architecture_relations() -> None: + bundle = EvidenceBundle( + resolved_sub_intent="ARCHITECTURE", + resolved_target="RuntimeManager", + evidence_count=3, + code_chunks=[ + CodeChunkItem(layer="C1_SYMBOL_CATALOG", path="src/runtime.py", title="RuntimeManager", content="", metadata={"qname": "RuntimeManager", "kind": "class"}), + CodeChunkItem(layer="C4_SEMANTIC_ROLES", path="src/runtime.py", title="RuntimeManager", content="", metadata={"symbol_name": "RuntimeManager", "role": "orchestrator"}), + ], + relations=[ + { + "path": "src/runtime.py", + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.record"}, + } + ], + ) + gate = CodeQaPostEvidenceGate() + vague = gate.validate( + answer="RuntimeManager и TraceService образуют центральный компонент runtime.", + answer_mode="normal", + degraded_message="", + sub_intent="ARCHITECTURE", + user_query="Architecture of RuntimeManager", + evidence_pack=bundle, + ) + concrete = gate.validate( + answer="RuntimeManager.start вызывает TraceService.record в src/runtime.py.", + answer_mode="normal", + degraded_message="", + sub_intent="ARCHITECTURE", + user_query="Architecture of RuntimeManager", + evidence_pack=bundle, + ) + assert vague.passed is False + assert "missing_relation_verbs" in vague.reasons or "missing_concrete_relations" in vague.reasons + assert concrete.passed is True + + +def test_post_gate_rejects_architecture_with_retrieval_labels() -> None: + bundle = EvidenceBundle( + resolved_sub_intent="ARCHITECTURE", + resolved_target="RuntimeManager", + evidence_count=2, + relations=[ + { + "path": "src/runtime.py", + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.dataflow_slice"}, + } + ], + ) + result = CodeQaPostEvidenceGate().validate( + answer="RuntimeManager связан с dataflow_slice и строит вокруг него архитектуру.", + answer_mode="normal", + degraded_message="", + sub_intent="ARCHITECTURE", + user_query="Architecture of RuntimeManager", + evidence_pack=bundle, + ) + assert result.passed is False + assert "contains_retrieval_artifacts" in result.reasons + + +def test_post_gate_trace_flow_requires_sequence_and_blocks_overclaim() -> None: + bundle = EvidenceBundle( + resolved_sub_intent="TRACE_FLOW", + resolved_target="RuntimeManager", + evidence_count=3, + relations=[ + { + "path": "src/runtime.py", + "start_line": 10, + "metadata": {"edge_type": "calls", "src_qname": "RuntimeManager.start", "dst_ref": "TraceService.record"}, + }, + { + "path": "src/runtime.py", + "start_line": 11, + "metadata": {"edge_type": "calls", "src_qname": "TraceService.record", "dst_ref": "Registry.register"}, + }, + ], + ) + gate = CodeQaPostEvidenceGate() + vague = gate.validate( + answer="RuntimeManager инициализирует службы и полностью восстанавливается.", + answer_mode="normal", + degraded_message="", + sub_intent="TRACE_FLOW", + user_query="Trace RuntimeManager", + evidence_pack=bundle, + ) + concrete = gate.validate( + answer="Сначала RuntimeManager.start вызывает TraceService.record, затем TraceService.record вызывает Registry.register.", + answer_mode="normal", + degraded_message="", + sub_intent="TRACE_FLOW", + user_query="Trace RuntimeManager", + evidence_pack=bundle, + ) + assert vague.passed is False + assert "missing_flow_steps" in vague.reasons or "too_vague_for_trace_flow" in vague.reasons + assert "overclaims_trace_completeness" in vague.reasons + assert concrete.passed is True diff --git a/tests/pipeline_setup_v2/core/artifacts.py b/tests/pipeline_setup_v2/core/artifacts.py index 2edc195..06b07a9 100644 --- a/tests/pipeline_setup_v2/core/artifacts.py +++ b/tests/pipeline_setup_v2/core/artifacts.py @@ -65,8 +65,8 @@ class SummaryComposer: "", f"Passed: {passed}/{len(results)}", "", - "| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Pass |", - "|------|------|-------|---------------------|--------|-------------------|------------|------|", + "| File | Case | Query | Expected sub-intent | Intent | Actual sub-intent | RAG layers | Tokens | Pass |", + "|------|------|-------|---------------------|--------|-------------------|------------|--------|------|", ] lines.extend(self._result_rows(results)) lines.extend(self._failure_section(results)) @@ -80,7 +80,7 @@ class SummaryComposer: 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 '✗'} |" + f"{actual.get('sub_intent') or '—'} | {self._rag_layers_text(item)} | {self._token_text(item)} | {'✓' if item.passed else '✗'} |" ) return rows @@ -142,3 +142,10 @@ class SummaryComposer: return "—" parts = [f"{layer}:{counts[layer]}" for layer in sorted(counts)] return self._table_text(", ".join(parts), limit=120) + + def _token_text(self, item: V2CaseResult) -> str: + diagnostics = dict(item.details.get("diagnostics") or {}) + prompt = dict(diagnostics.get("prompt") or {}) + stats = dict(prompt.get("prompt_stats") or {}) + value = stats.get("tokens_in_estimate") + return str(value) if value is not None else "—" diff --git a/tests/pipeline_setup_v2/core/test_validators.py b/tests/pipeline_setup_v2/core/test_validators.py index bd5cb11..886f0ca 100644 --- a/tests/pipeline_setup_v2/core/test_validators.py +++ b/tests/pipeline_setup_v2/core/test_validators.py @@ -2,6 +2,7 @@ from __future__ import annotations from pathlib import Path +from tests.pipeline_setup_v2.core.artifacts import SummaryComposer from tests.pipeline_setup_v2.core.models import CaseExpectations, LlmExpectation, RetrievalExpectation, RouterExpectation, V2Case from tests.pipeline_setup_v2.core.validators import CaseValidator @@ -108,3 +109,29 @@ def test_llm_contains_and_excludes_checks() -> None: mismatches = CaseValidator().validate(case, actual, {}) assert mismatches == [] + + +def test_summary_includes_token_usage_column() -> None: + case = V2Case( + case_id="llm-quality", + runner="runtime", + mode="full_chain", + query="Где health endpoint?", + source_file=Path("cases.yaml"), + ) + result_text = SummaryComposer().compose([ + type( + "Result", + (), + { + "case": case, + "actual": {"intent": "CODE_QA", "sub_intent": "FIND_ENTRYPOINTS"}, + "details": {"diagnostics": {"prompt": {"prompt_stats": {"tokens_in_estimate": 654}}}, "rag_rows": []}, + "passed": True, + "mismatches": [], + }, + )() + ]) + + assert "Tokens" in result_text + assert "654" in result_text diff --git a/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml new file mode 100644 index 0000000..7a306d5 --- /dev/null +++ b/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml @@ -0,0 +1,121 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - id: plba-v3-open-file-runtime + query: "Открой файл src/app_runtime/core/runtime.py" + notes: "Representative OPEN_FILE case copied from full_chain_plba_code_subintents_v2.yaml" + 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-v3-explain-runtime-manager + query: "Объясни как работает класс RuntimeManager" + notes: "Representative EXPLAIN case copied from full_chain_plba_code_subintents_v2.yaml" + 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-v3-explain-local-http-channel + query: "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?" + notes: "Representative EXPLAIN_LOCAL case copied from full_chain_plba_code_subintents_v2.yaml" + 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 + + - id: plba-v3-find-tests-runtime-manager + query: "Где тесты для RuntimeManager?" + notes: "Representative FIND_TESTS case copied from full_chain_plba_code_subintents_v2.yaml" + 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-v3-find-entrypoints-health-endpoint + query: "Где health endpoint?" + notes: "Representative FIND_ENTRYPOINTS case copied from full_chain_plba_code_subintents_v2.yaml" + 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"] + + - id: plba-v3-trace-flow-runtime-start + query: "Покажи поток выполнения при запуске RuntimeManager" + notes: "Representative TRACE_FLOW case copied from full_chain_plba_code_subintents_v2.yaml" + 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 + + - id: plba-v3-architecture-runtime-manager + query: "Какие компоненты участвуют в RuntimeManager?" + notes: "Representative ARCHITECTURE case copied from full_chain_plba_code_subintents_v2.yaml" + 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 diff --git a/tests/pipeline_setup_v3/core/artifacts.py b/tests/pipeline_setup_v3/core/artifacts.py index 17b90cf..7ace880 100644 --- a/tests/pipeline_setup_v3/core/artifacts.py +++ b/tests/pipeline_setup_v3/core/artifacts.py @@ -66,8 +66,8 @@ class SummaryComposer: "", f"Passed: {passed}/{len(results)}", "", - "| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass |", - "|------|------|------|-------|-------------------|------------|------|", + "| File | Case | Mode | Query | Actual sub-intent | RAG layers | Tokens | Pass |", + "|------|------|------|-------|-------------------|------------|--------|------|", ] lines.extend(self._rows(results)) failures = [item for item in results if not item.passed] @@ -84,7 +84,7 @@ class SummaryComposer: 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 '✗'} |" + f"{self._layer_text(item.details)} | {self._token_text(item.details)} | {'✓' if item.passed else '✗'} |" ) return rows @@ -104,6 +104,16 @@ class SummaryComposer: return compact return compact[: limit - 1].rstrip() + "…" + def _token_text(self, details: dict) -> str: + token_usage = dict(details.get("token_usage") or {}) + direct = token_usage.get("tokens_in_estimate") + if direct is not None: + return str(direct) + prompt = dict(details.get("diagnostics", {}).get("prompt") or {}) + stats = dict(prompt.get("prompt_stats") or {}) + value = stats.get("tokens_in_estimate") + return str(value) if value is not None else "—" + 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: diff --git a/tests/pipeline_setup_v3/core/test_validators.py b/tests/pipeline_setup_v3/core/test_validators.py index 4488c88..ad6cac7 100644 --- a/tests/pipeline_setup_v3/core/test_validators.py +++ b/tests/pipeline_setup_v3/core/test_validators.py @@ -2,6 +2,7 @@ from __future__ import annotations from pathlib import Path +from tests.pipeline_setup_v3.core.artifacts import SummaryComposer from tests.pipeline_setup_v3.core.models import CaseExpectations, LlmExpectation, RetrievalExpectation, RouterExpectation, V3Case from tests.pipeline_setup_v3.core.validators import CaseValidator @@ -66,3 +67,29 @@ def test_llm_contains_and_excludes_checks() -> None: } assert CaseValidator().validate(case, actual, {}) == [] + + +def test_summary_includes_token_usage_column() -> None: + case = V3Case( + case_id="llm-quality", + runner="agent_runtime", + mode="full_chain", + query="Где health endpoint?", + source_file=Path("cases.yaml"), + ) + result_text = SummaryComposer().compose([ + type( + "Result", + (), + { + "case": case, + "actual": {"sub_intent": "FIND_ENTRYPOINTS"}, + "details": {"token_usage": {"tokens_in_estimate": 321}, "rag_rows": []}, + "passed": True, + "mismatches": [], + }, + )() + ]) + + assert "Tokens" in result_text + assert "321" in result_text diff --git a/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py b/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py index 8bf35f8..9ddd33d 100644 --- a/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py +++ b/tests/pipeline_setup_v3/runtime/agent_runtime_adapter.py @@ -1,5 +1,7 @@ from __future__ import annotations +import math + 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 @@ -87,6 +89,7 @@ class AgentRuntimeAdapter: "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"), + "token_usage": _token_usage(result), "steps": list(result.runtime_trace), } return ExecutionPayload(actual=actual, details=details) @@ -169,3 +172,15 @@ def _answer_status(answer_mode: str, llm_used: bool) -> str: if answer_mode == "normal" and llm_used: return "answered" return answer_mode + + +def _token_usage(result) -> dict: + draft = result.draft_answer + if draft is None: + return {} + system_prompt = PromptLoader().load(draft.prompt_name) + tokens_in_estimate = max(1, int(math.ceil((len(system_prompt or "") + len(draft.prompt_payload or "")) / 4))) + return { + "prompt_name": draft.prompt_name, + "tokens_in_estimate": tokens_in_estimate, + } diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339.zip b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339.zip new file mode 100644 index 0000000..af85126 Binary files /dev/null and b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339.zip differ 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-architecture-runtime-manager.json similarity index 91% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-architecture-runtime-manager.json index 9235c24..f5b99ed 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-architecture-runtime-manager.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-architecture-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Какие компоненты участвуют в RuntimeManager?", @@ -10,7 +10,7 @@ "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 включают перечисленные выше компоненты.", + "llm_answer": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_async** (src/app_runtime/control/service.py:14-47)\n- **RuntimeManager.start** (src/app_runtime/core/runtime.py:32-59)\n- **ControlPlaneService.start** (src/app_runtime/control/service.py:14-20)\n- **ControlPlaneService.stop** (src/app_runtime/control/service.py:14-25)\n- **ControlPlaneService._stop_async** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.add_config_file** (src/app_runtime/core/runtime.py:32-52)\n- **ControlPlaneService.register_channel** (src/app_runtime/control/service.py:14-17)\n\nСвязи между компонентами:\n\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService._start_async**\n- **RuntimeManager.__init__ dataflow_slice RuntimeManager.start**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService.start**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService.stop**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService._stop_async**\n- **RuntimeManager.__init__ dataflow_slice RuntimeManager.add_config_file**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService.register_channel**\n- **RuntimeManager.__init__ dataflow_slice RuntimeManager._register_core_services**\n\nОтветственность подсистемы заключается в управлении жизненным циклом приложения, загрузке конфигурационных файлов и регистрации каналов управления через ControlPlaneService.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -120,12 +120,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1306,6 +1310,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1346,6 +1355,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 59, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.start", "metadata": { "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", "edge_type": "dataflow_slice", @@ -1386,6 +1400,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1426,6 +1445,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1466,6 +1490,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1506,6 +1535,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1546,6 +1580,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1586,6 +1625,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 127, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager._register_core_services", "metadata": { "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", "edge_type": "dataflow_slice", @@ -1625,37 +1669,115 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/core/runtime.py", + "title": "RuntimeManager", + "symbol": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "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)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "symbol": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)" + }, + { + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "symbol": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)" + }, + { + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "symbol": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "symbol": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1683,6 +1805,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1706,6 +1835,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3025,11 +3188,11 @@ "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 + "C4_SEMANTIC_ROLES": 43, + "C3_ENTRYPOINTS": 25, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 27 } } }, @@ -3045,6 +3208,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3059,7 +3225,7 @@ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -3112,8 +3278,42 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 196, + "pre_evidence_gate": 1, + "llm": 9911, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -4358,6 +4558,158 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "token_usage": { + "prompt_name": "code_qa_architecture_answer", + "tokens_in_estimate": 4061 + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 196 + }, + "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": 43, + "C3_ENTRYPOINTS": 25, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 27 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 9911 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-architecture-runtime-manager.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-architecture-runtime-manager.md new file mode 100644 index 0000000..d6453a8 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-architecture-runtime-manager.md @@ -0,0 +1,305 @@ +# plba-v3-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.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- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_async** (src/app_runtime/control/service.py:14-47)\n- **RuntimeManager.start** (src/app_runtime/core/runtime.py:32-59)\n- **ControlPlaneService.start** (src/app_runtime/control/service.py:14-20)\n- **ControlPlaneService.stop** (src/app_runtime/control/service.py:14-25)\n- **ControlPlaneService._stop_async** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.add_config_file** (src/app_runtime/core/runtime.py:32-52)\n- **ControlPlaneService.register_channel** (src/app_runtime/control/service.py:14-17)\n\nСвязи между компонентами:\n\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService._start_async**\n- **RuntimeManager.__init__ dataflow_slice RuntimeManager.start**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService.start**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService.stop**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService._stop_async**\n- **RuntimeManager.__init__ dataflow_slice RuntimeManager.add_config_file**\n- **ControlPlaneService.__init__ dataflow_slice ControlPlaneService.register_channel**\n- **RuntimeManager.__init__ dataflow_slice RuntimeManager._register_core_services**\n\nОтветственность подсистемы заключается в управлении жизненным циклом приложения, загрузке конфигурационных файлов и регистрации каналов управления через ControlPlaneService.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 196 + }, + "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": 43, + "C3_ENTRYPOINTS": 25, + "C2_DEPENDENCY_GRAPH": 64, + "C1_SYMBOL_CATALOG": 34, + "C0_SOURCE_CHUNKS": 27 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 9911 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn" + } + } +] + +## 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", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** (src/app_runtime/core/runtime.py:18-179)\n- **ControlPlaneService.__init__** (src/app_runtime/control/service.py:14-51)\n- **RuntimeManager.__init__** (src/app_runtime/core/runtime.py:32-127)\n- **ControlPlaneService._start_asyn" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 196, + "pre_evidence_gate": 1, + "llm": 9911, + "post_evidence_gate": 1 + } +} + +## 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-local-http-channel.json similarity index 89% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-local-http-channel.json index df03e18..404d2b8 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-local-http-channel.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-explain-local-http-channel", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так?", @@ -10,7 +10,7 @@ "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`.", + "llm_answer": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с переданным набором действий (ControlActionSet), а метод stop останавливает его. Свойство port возвращает текущий порт runner.\n\nВнутри класса определены два обработчика: _health_response проверяет здоровье канала, возвращая статус \"unhealthy\" если действия не установлены; \n_action_response предположительно обрабатывает запросы на выполнение действий, но его реализация в данном фрагменте не показана.", "answer_mode": "answered", "path_scope": [ "src/app_runtime/control/http_channel.py" @@ -151,12 +151,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "HttpControlChannel", "alternatives": [ - "HttpControlChannel" + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -738,6 +742,11 @@ "relations": [ { "path": "src/app_runtime/control/http_channel.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel._action_response", "metadata": { "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", "edge_type": "dataflow_slice", @@ -778,6 +787,11 @@ }, { "path": "src/app_runtime/control/http_channel.py", + "start_line": 15, + "end_line": 22, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel.start", "metadata": { "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", "edge_type": "dataflow_slice", @@ -818,6 +832,11 @@ }, { "path": "src/app_runtime/control/http_channel.py", + "start_line": 14, + "end_line": 34, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel._health_response", "metadata": { "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", "edge_type": "dataflow_slice", @@ -858,6 +877,11 @@ }, { "path": "src/app_runtime/control/http_channel.py", + "start_line": 15, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel.stop", "metadata": { "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", "edge_type": "dataflow_slice", @@ -897,6 +921,7 @@ "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -1454,8 +1479,8 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 31, - "C0_SOURCE_CHUNKS": 15, + "C1_SYMBOL_CATALOG": 26, + "C0_SOURCE_CHUNKS": 16, "C2_DEPENDENCY_GRAPH": 17 } } @@ -1470,6 +1495,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -1484,7 +1512,7 @@ "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -1525,8 +1553,44 @@ "failure_reasons": [], "evidence_count": 13 }, + "evidence_gate_input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 2, + "retrieval": 60, + "pre_evidence_gate": 1, + "llm": 3231, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -2028,6 +2092,150 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "token_usage": { + "prompt_name": "code_qa_explain_local_answer", + "tokens_in_estimate": 2071 + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 60 + }, + "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": 26, + "C0_SOURCE_CHUNKS": 16, + "C2_DEPENDENCY_GRAPH": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 13 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3231 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-local-http-channel.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-local-http-channel.md new file mode 100644 index 0000000..5a9d240 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-local-http-channel.md @@ -0,0 +1,285 @@ +# plba-v3-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.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 наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с переданным набором действий (ControlActionSet), а метод stop останавливает его. Свойство port возвращает текущий порт runner.\n\nВнутри класса определены два обработчика: _health_response проверяет здоровье канала, возвращая статус \"unhealthy\" если действия не установлены; \n_action_response предположительно обрабатывает запросы на выполнение действий, но его реализация в данном фрагменте не показана.", + "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": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 60 + }, + "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": 26, + "C0_SOURCE_CHUNKS": 16, + "C2_DEPENDENCY_GRAPH": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 13 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3231 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и реализует HTTP-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI-приложения. \n\nМетод start запускает сервер с пер" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 2, + "retrieval": 60, + "pre_evidence_gate": 1, + "llm": 3231, + "post_evidence_gate": 1 + } +} + +## 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-runtime-manager.json b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-runtime-manager.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-runtime-manager.json index 3a125c2..a6501f3 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-runtime-manager.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-explain-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Объясни как работает класс RuntimeManager", @@ -10,8 +10,8 @@ "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", + "llm_answer": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager.", + "answer_mode": "degraded", "path_scope": [], "symbol_candidates": [ "RuntimeManager" @@ -131,12 +131,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1277,6 +1281,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1317,6 +1326,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1357,6 +1371,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1397,6 +1416,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1437,6 +1461,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1477,6 +1506,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1516,37 +1550,83 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/core/runtime.py", + "title": "RuntimeManager", + "symbol": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "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)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1574,6 +1654,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1597,6 +1684,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2866,11 +2987,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 51, - "C0_SOURCE_CHUNKS": 16, + "C1_SYMBOL_CATALOG": 494, + "C0_SOURCE_CHUNKS": 17, "C4_SEMANTIC_ROLES": 14, - "C2_DEPENDENCY_GRAPH": 54, - "C3_ENTRYPOINTS": 11 + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 14 } } }, @@ -2885,7 +3006,10 @@ "C3_ENTRYPOINTS" ], "retrieval_sufficient": true, - "answer_mode": "normal", + "answer_mode": "degraded", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2900,7 +3024,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2953,8 +3077,46 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он является основным компонентом для управления жизненным циклом приложения и конфигурациями.\n\nМетоды:\n- Конструктор `__init__`: инициализирует объект RuntimeManager и принимает конфигурацию.\n- `add_config_file`: добавляет ф", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 2, + "retrieval": 597, + "pre_evidence_gate": 1, + "llm": 5865, + "post_evidence_gate": 2, + "repair": 4529, + "post_evidence_gate_recheck": 2 + } }, "rag_rows": [ { @@ -4146,9 +4308,165 @@ } ], "validation": { - "passed": true, - "action": "return", - "reasons": [] - } + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ] + }, + "token_usage": { + "prompt_name": "code_qa_explain_answer", + "tokens_in_estimate": 4504 + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 597 + }, + "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": 494, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 5865 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он является основным компонентом для управления жизненным циклом приложения и конфигурациями.\n\nМетоды:\n- Конструктор `__init__`: инициализирует объект RuntimeManager и принимает конфигурацию.\n- `add_config_file`: добавляет ф", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 2, + "post_evidence_gate_recheck": 2, + "repair": 4529 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он является основным компонентом для управления жизненным циклом приложения и конфигурациями.\n\nМетоды:\n- Конструктор `__init__`: инициализирует объект RuntimeManager и принимает конфигурацию.\n- `add_config_file`: добавляет ф", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-runtime-manager.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-runtime-manager.md new file mode 100644 index 0000000..f45eef0 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-explain-runtime-manager.md @@ -0,0 +1,311 @@ +# plba-v3-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.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.", + "answer_mode": "degraded", + "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": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 597 + }, + "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": 494, + "C0_SOURCE_CHUNKS": 17, + "C4_SEMANTIC_ROLES": 14, + "C2_DEPENDENCY_GRAPH": 55, + "C3_ENTRYPOINTS": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 5865 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он является основным компонентом для управления жизненным циклом приложения и конфигурациями.\n\nМетоды:\n- Конструктор `__init__`: инициализирует объект RuntimeManager и принимает конфигурацию.\n- `add_config_file`: добавляет ф", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 2, + "post_evidence_gate_recheck": 2, + "repair": 4529 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он является основным компонентом для управления жизненным циклом приложения и конфигурациями.\n\nМетоды:\n- Конструктор `__init__`: инициализирует объект RuntimeManager и принимает конфигурацию.\n- `add_config_file`: добавляет ф", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + } +] + +## 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": "degraded", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он является основным компонентом для управления жизненным циклом приложения и конфигурациями.\n\nМетоды:\n- Конструктор `__init__`: инициализирует объект RuntimeManager и принимает конфигурацию.\n- `add_config_file`: добавляет ф", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 2, + "retrieval": 597, + "pre_evidence_gate": 1, + "llm": 5865, + "post_evidence_gate": 2, + "repair": 4529, + "post_evidence_gate_recheck": 2 + } +} + +## 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-entrypoints-health-endpoint.json similarity index 75% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-entrypoints-health-endpoint.json index 4c8ea75..a37e36a 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-entrypoints-health-endpoint.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-find-entrypoints-health-endpoint", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где health endpoint?", @@ -9,8 +9,8 @@ "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)", + "rag_count": 10, + "llm_answer": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -22,10 +22,8 @@ "C0_SOURCE_CHUNKS" ] }, - "passed": false, - "mismatches": [ - "llm: expected answer to contain 'GET /health'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Где health endpoint?", "router_result": { @@ -122,12 +120,9 @@ } }, "symbol_resolution": { - "status": "pending", + "status": "not_found", "resolved_symbol": null, - "alternatives": [ - "health", - "endpoint" - ], + "alternatives": [], "confidence": 0.0 }, "evidence_policy": { @@ -491,28 +486,22 @@ "last_modified": null, "staleness_score": null } - } - ], - "relations": [], - "entrypoints": [ + }, { + "layer": "C0_SOURCE_CHUNKS", "path": "src/app_runtime/control/http_app.py", - "title": "app.post", + "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": { - "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", - "entry_type": "http", - "framework": "fastapi", - "route_or_command": "app.post", - "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", "is_test": false, - "lang_payload": { - "methods": [ - "POST" - ] - }, - "artifact_type": null, "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", "repo_id": "plba", + "artifact_type": null, "section": null, "doc_id": null, "doc_version": null, @@ -521,10 +510,21 @@ "last_modified": null, "staleness_score": null } - }, + } + ], + "relations": [], + "semantic_hints": [], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -552,6 +552,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -575,6 +582,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -587,7 +628,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -884,6 +925,36 @@ "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 + } } ], "retrieval_report": { @@ -893,18 +964,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -912,9 +985,16 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 22, - "C0_SOURCE_CHUNKS": 20 - } + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 15 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, "diagnostics": { @@ -926,6 +1006,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -937,7 +1020,7 @@ "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -958,7 +1041,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -967,10 +1050,44 @@ "evidence_gate_decision": { "sufficient": true, "failure_reasons": [], - "evidence_count": 9 + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 64, + "pre_evidence_gate": 1, + "llm": 1406, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -1263,12 +1380,179 @@ "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 + } } ], "validation": { "passed": true, "action": "return", "reasons": [] - } + }, + "token_usage": { + "prompt_name": "code_qa_find_entrypoints_answer", + "tokens_in_estimate": 2531 + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 64 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 15 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1406 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..1d8636e --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-entrypoints-health-endpoint.md @@ -0,0 +1,261 @@ +# plba-v3-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml +- runner: agent_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": 10, + "llm_answer": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 64 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 15 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1406 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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": 7, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 64, + "pre_evidence_gate": 1, + "llm": 1406, + "post_evidence_gate": 1 + } +} + +## 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-tests-runtime-manager.json similarity index 94% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-tests-runtime-manager.json index 99d0936..5e4a159 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-tests-runtime-manager.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-find-tests-runtime-manager", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для RuntimeManager?", @@ -10,7 +10,7 @@ "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", + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -136,12 +136,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1017,6 +1021,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1057,6 +1066,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1097,6 +1111,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1137,6 +1156,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1177,6 +1201,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1217,6 +1246,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1256,6 +1290,7 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [ { @@ -2188,9 +2223,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 45, - "C2_DEPENDENCY_GRAPH": 53, - "C0_SOURCE_CHUNKS": 17 + "C1_SYMBOL_CATALOG": 50, + "C2_DEPENDENCY_GRAPH": 59, + "C0_SOURCE_CHUNKS": 22 } } }, @@ -2204,6 +2239,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2216,7 +2254,7 @@ "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2255,8 +2293,42 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 132, + "pre_evidence_gate": 1, + "llm": 1662, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -3128,6 +3200,142 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "token_usage": { + "prompt_name": "code_qa_find_tests_answer", + "tokens_in_estimate": 3660 + }, + "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": 132 + }, + "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": 50, + "C2_DEPENDENCY_GRAPH": 59, + "C0_SOURCE_CHUNKS": 22 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1662 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-tests-runtime-manager.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-tests-runtime-manager.md new file mode 100644 index 0000000..32ab13f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-find-tests-runtime-manager.md @@ -0,0 +1,269 @@ +# plba-v3-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.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`.\n\nКосвенные тесты:\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" + ] +} + +## 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": 132 + }, + "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": 50, + "C2_DEPENDENCY_GRAPH": 59, + "C0_SOURCE_CHUNKS": 22 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1662 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие сущности контроля, которые взаимодействуют с `RuntimeManager`." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 132, + "pre_evidence_gate": 1, + "llm": 1662, + "post_evidence_gate": 1 + } +} + +## 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-open-file-runtime.json similarity index 85% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-open-file-runtime.json index a6b476d..1f07d15 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-open-file-runtime.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-open-file-runtime", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Открой файл src/app_runtime/core/runtime.py", @@ -10,7 +10,7 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 1, - "llm_answer": "Виден класс `RuntimeManager` с методом `__init__`, принимающим несколько параметров. Фиксированы также константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`.", + "llm_answer": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\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- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`", "answer_mode": "answered", "path_scope": [ "src/app_runtime/core/runtime.py" @@ -250,6 +250,7 @@ } ], "relations": [], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -322,7 +323,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 221 + "C0_SOURCE_CHUNKS": 132 } } }, @@ -334,6 +335,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -373,12 +377,43 @@ "failure_reasons": [], "evidence_count": 1 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 221, - "pre_evidence_gate": 0, - "llm": 578 + "router": 1, + "retrieval": 132, + "pre_evidence_gate": 1, + "llm": 3550, + "post_evidence_gate": 2 } }, "rag_rows": [ @@ -418,12 +453,16 @@ "action": "return", "reasons": [] }, + "token_usage": { + "prompt_name": "code_qa_open_file_answer", + "tokens_in_estimate": 1128 + }, "steps": [ { "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -436,7 +475,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 221 + "retrieval": 132 }, "output": { "rag_count": 1, @@ -476,7 +515,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 221 + "C0_SOURCE_CHUNKS": 132 } } }, @@ -484,36 +523,64 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 1 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 578 + "llm": 3550 }, "output": { "prompt_name": "code_qa_open_file_answer", - "answer_preview": "Виден класс `RuntimeManager` с методом `__init__`, принимающим несколько параметров. Фиксированы также константы `ACTION_TIMEOUT_SECONDS` и `ACTION_POLL_INTERVAL_SECONDS`." + "answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 2, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип" } } ] diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-open-file-runtime.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-open-file-runtime.md new file mode 100644 index 0000000..fcc93ea --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-open-file-runtime.md @@ -0,0 +1,250 @@ +# plba-v3-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.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` определён класс `RuntimeManager`.\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- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 132 + }, + "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": 132 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3550 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 2, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько классов полей с умолчательными сервисами:\n- `configuration`: тип `ConfigurationManager`\n- `services`: тип `ServiceContainer`\n- `traces`: тип `TraceService`\n- `health`: тип `HealthRegistry`\n- `logs`: тип" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 132, + "pre_evidence_gate": 1, + "llm": 3550, + "post_evidence_gate": 2 + } +} + +## 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-trace-flow-runtime-start.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-trace-flow-runtime-start.json index 86a424b..222bed8 100644 --- 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/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-trace-flow-runtime-start.json @@ -1,6 +1,6 @@ { - "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", + "case_id": "plba-v3-trace-flow-runtime-start", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Покажи поток выполнения при запуске RuntimeManager", @@ -10,7 +10,7 @@ "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`", + "llm_answer": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связях внутри класса `RuntimeManager`. \nКонкретные реализации логики запуска находятся в файле `src/app_runtime/core/runtime.py`, строки 32–127.\n\nПоток выполнения полностью восстанавливается по данным контекстного фрагмента.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -120,12 +120,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1431,6 +1435,11 @@ "relations": [ { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1471,6 +1480,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 33, + "end_line": 39, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.__init__", "metadata": { "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", "edge_type": "dataflow_slice", @@ -1511,6 +1525,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1551,6 +1570,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1591,6 +1615,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 59, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.start", "metadata": { "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", "edge_type": "dataflow_slice", @@ -1631,6 +1660,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 127, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager._register_core_services", "metadata": { "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", "edge_type": "dataflow_slice", @@ -1671,6 +1705,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1711,6 +1750,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1751,6 +1795,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1791,6 +1840,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 33, + "end_line": 127, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager._register_core_services", "metadata": { "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", "edge_type": "dataflow_slice", @@ -1830,37 +1884,83 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/core/runtime.py", + "title": "RuntimeManager", + "symbol": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "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)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1888,6 +1988,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1911,6 +2018,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3380,11 +3521,11 @@ "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 + "C1_SYMBOL_CATALOG": 59, + "C0_SOURCE_CHUNKS": 45, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 21 } } }, @@ -3400,6 +3541,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3414,7 +3558,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -3467,8 +3611,42 @@ "failure_reasons": [], "evidence_count": 37 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 2, + "retrieval": 211, + "pre_evidence_gate": 1, + "llm": 3158, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -4863,6 +5041,158 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "token_usage": { + "prompt_name": "code_qa_trace_flow_answer", + "tokens_in_estimate": 4310 + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 211 + }, + "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": 59, + "C0_SOURCE_CHUNKS": 45, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 21 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3158 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-trace-flow-runtime-start.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-trace-flow-runtime-start.md new file mode 100644 index 0000000..8dade62 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/full_chain_plba_code_subintents_one_per_subintent_plba-v3-trace-flow-runtime-start.md @@ -0,0 +1,305 @@ +# plba-v3-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_one_per_subintent.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. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связях внутри класса `RuntimeManager`. \nКонкретные реализации логики запуска находятся в файле `src/app_runtime/core/runtime.py`, строки 32–127.\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": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 211 + }, + "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": 59, + "C0_SOURCE_CHUNKS": 45, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 62, + "C3_ENTRYPOINTS": 21 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3158 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ" + } + } +] + +## 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", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через `add_config_file`.\n2. Инициализация сервисов.\n3. Регистрация основных служб через `_register_core_services`.\n4. Запуск менеджера с помощью метода `start`.\n\nЭти этапы основаны на сигнатурах методов и их связ" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 2, + "retrieval": 211, + "pre_evidence_gate": 1, + "llm": 3158, + "post_evidence_gate": 1 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/summary.md b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/summary.md new file mode 100644 index 0000000..c6bb4a5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/manual_run/20260312_193339/summary.md @@ -0,0 +1,36 @@ +# pipeline_setup_v3 summary + +Passed: 7/7 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Tokens | Pass | +|------|------|------|-------|-------------------|------------|--------|------| +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-open-file-runtime | full_chain | Открой файл src/app_runtime/core/runtime.py | OPEN_FILE | C0_SOURCE_CHUNKS:1 | 1128 | ✓ | +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-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 | 4504 | ✓ | +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-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 | 2071 | ✓ | +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-find-tests-runtime-manager | full_chain | Где тесты для RuntimeManager? | FIND_TESTS | C0_SOURCE_CHUNKS:10, C1_SYMBOL_CATALOG:8, C2_DEPENDENCY_GRAPH:6 | 3660 | ✓ | +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-find-entrypoints-health-endpoint | full_chain | Где health endpoint? | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:7, C3_ENTRYPOINTS:3 | 2531 | ✓ | +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-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 | 4310 | ✓ | +| full_chain_plba_code_subintents_one_per_subintent.yaml | plba-v3-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 | 4061 | ✓ | + +## LLM Answers +- **plba-v3-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > В файле \`src/app\_runtime/core/runtime.py\` определён класс \`RuntimeManager\`. У него есть несколько классов полей с умолчательными сервисами: \- \`configuration\`: тип \`ConfigurationManager\` \- \`services\`: тип \`ServiceContainer\` \- \`traces\`: тип \`TraceService\` \- \`health\`: тип \`HealthRegistry\` \- \`logs\`: тип \`LogManager\` \- \`workers\`: тип \`WorkerSupervisor\` \- \`control\_plane\`: тип \`ControlPlaneService\` Также определены константы таймаутов: \- \`ACTION\_TIMEOUT\_SECONDS = 10.0\` \- \`ACTION\_POLL\_INTERVAL\_SECONDS = 0.05\` +- **plba-v3-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager. +- **plba-v3-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс HttpControlChannel наследует ControlChannel и реализует HTTP\-канал управления. Он принимает хост, порт и таймаут при инициализации, создаёт экземпляр UvicornThreadRunner для запуска сервера и использует HttpControlAppFactory для создания FastAPI\-приложения. Метод start запускает сервер с переданным набором действий \(ControlActionSet\), а метод stop останавливает его. Свойство port возвращает текущий порт runner. Внутри класса определены два обработчика: \_health\_response проверяет здоровье канала, возвращая статус "unhealthy" если действия не установлены; \_action\_response предположительно обрабатывает запросы на выполнение действий, но его реализация в данном фрагменте не показана. +- **plba-v3-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` находятся в файле \`tests/test\_runtime.py\`. Косвенные тесты: \- В файле \`tests/test\_business\_control\_actions.py\` есть тесты, использующие сущности контроля, которые взаимодействуют с \`RuntimeManager\`. +- **plba-v3-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Подтверждённая точка входа для health endpoint: GET /health, declared in src/app\_runtime/control/http\_app.py, lines 31\-34, handler function named 'health'. +- **plba-v3-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске \`RuntimeManager\` выполняются следующие шаги: 1. Инициализация конфигурации через \`add\_config\_file\`. 2. Инициализация сервисов. 3. Регистрация основных служб через \`\_register\_core\_services\`. 4. Запуск менеджера с помощью метода \`start\`. Эти этапы основаны на сигнатурах методов и их связях внутри класса \`RuntimeManager\`. Конкретные реализации логики запуска находятся в файле \`src/app\_runtime/core/runtime.py\`, строки 32–127. Поток выполнения полностью восстанавливается по данным контекстного фрагмента. +- **plba-v3-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > Компоненты, участвующие в подсистеме RuntimeManager: \- \*\*RuntimeManager\*\* \(src/app\_runtime/core/runtime.py:18\-179\) \- \*\*ControlPlaneService.\_\_init\_\_\*\* \(src/app\_runtime/control/service.py:14\-51\) \- \*\*RuntimeManager.\_\_init\_\_\*\* \(src/app\_runtime/core/runtime.py:32\-127\) \- \*\*ControlPlaneService.\_start\_async\*\* \(src/app\_runtime/control/service.py:14\-47\) \- \*\*RuntimeManager.start\*\* \(src/app\_runtime/core/runtime.py:32\-59\) \- \*\*ControlPlaneService.start\*\* \(src/app\_runtime/control/service.py:14\-20\) \- \*\*ControlPlaneService.stop\*\* \(src/app\_runtime/control/service.py:14\-25\) \- \*\*ControlPlaneService.\_stop\_async\*\* \(src/app\_runtime/control/service.py:14\-51\) \- \*\*RuntimeManager.add\_config\_file\*\* \(src/app\_runtime/core/runtime.py:32\-52\) \- \*\*ControlPlaneService.register\_channel\*\* \(src/app\_runtime/control/service.py:14\-17\) Связи между компонентами: \- \*\*ControlPlaneService.\_\_init\_\_ dataflow\_slice… \ 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 deleted file mode 100644 index 37bd2fd..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index 4aedcac..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index d04c416..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index a2ca778..0000000 --- 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 +++ /dev/null @@ -1,2033 +0,0 @@ -{ - "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 deleted file mode 100644 index 10a3a23..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 271b1e1..0000000 --- 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 +++ /dev/null @@ -1,4092 +0,0 @@ -{ - "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 deleted file mode 100644 index 1c9d208..0000000 --- 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 +++ /dev/null @@ -1,36 +0,0 @@ -# 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.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 deleted file mode 100644 index 789c707..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 5cdd980..0000000 --- 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 +++ /dev/null @@ -1,4157 +0,0 @@ -{ - "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 deleted file mode 100644 index 238b762..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 17a7e0e..0000000 --- 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 +++ /dev/null @@ -1,1303 +0,0 @@ -{ - "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 deleted file mode 100644 index a27500c..0000000 --- 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 +++ /dev/null @@ -1,33 +0,0 @@ -# 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.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 deleted file mode 100644 index 9dd7d51..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index 013c72c..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index 7f1badd..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index 478ef7b..0000000 --- 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 +++ /dev/null @@ -1,3134 +0,0 @@ -{ - "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 deleted file mode 100644 index 36b6727..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index 8d465e3..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index b301f23..0000000 --- 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 +++ /dev/null @@ -1,31 +0,0 @@ -# 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 deleted file mode 100644 index d68abc5..0000000 --- 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 +++ /dev/null @@ -1,419 +0,0 @@ -{ - "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 deleted file mode 100644 index ce42881..0000000 --- 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 +++ /dev/null @@ -1,30 +0,0 @@ -# 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.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 deleted file mode 100644 index b1b8431..0000000 --- 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 +++ /dev/null @@ -1,30 +0,0 @@ -# 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 deleted file mode 100644 index d10f193..0000000 --- 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 +++ /dev/null @@ -1,4707 +0,0 @@ -{ - "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 deleted file mode 100644 index bfb4301..0000000 --- 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 +++ /dev/null @@ -1,35 +0,0 @@ -# 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 deleted file mode 100644 index 46b4f8b..0000000 --- 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 +++ /dev/null @@ -1,4868 +0,0 @@ -{ - "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 deleted file mode 100644 index a84364c..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 38cde5a..0000000 --- a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162307/summary.md +++ /dev/null @@ -1,86 +0,0 @@ -# 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 deleted file mode 100644 index 452c3ea..0000000 --- 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 +++ /dev/null @@ -1,4171 +0,0 @@ -{ - "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 deleted file mode 100644 index cc320c0..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 4094a86..0000000 --- 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 +++ /dev/null @@ -1,4363 +0,0 @@ -{ - "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 deleted file mode 100644 index 35c56ff..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 5296731..0000000 --- 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 +++ /dev/null @@ -1,3779 +0,0 @@ -{ - "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 deleted file mode 100644 index b8c0d9e..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index eb88212..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index adca3b7..0000000 --- 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 +++ /dev/null @@ -1,4092 +0,0 @@ -{ - "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 deleted file mode 100644 index 2908407..0000000 --- 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 +++ /dev/null @@ -1,36 +0,0 @@ -# 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.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 deleted file mode 100644 index 24ac750..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 8b4c9d3..0000000 --- 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 +++ /dev/null @@ -1,4157 +0,0 @@ -{ - "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 deleted file mode 100644 index 225c568..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index 5287615..0000000 --- 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 +++ /dev/null @@ -1,33 +0,0 @@ -# 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.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 deleted file mode 100644 index 9dd7d51..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index 173bf33..0000000 --- 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 +++ /dev/null @@ -1,2746 +0,0 @@ -{ - "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 deleted file mode 100644 index a8ed71b..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index e4076db..0000000 --- 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 +++ /dev/null @@ -1,3133 +0,0 @@ -{ - "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 deleted file mode 100644 index 7f1badd..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index bea3487..0000000 --- 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 +++ /dev/null @@ -1,3134 +0,0 @@ -{ - "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 deleted file mode 100644 index 15eb7ce..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index c6b7e33..0000000 --- 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 +++ /dev/null @@ -1,3001 +0,0 @@ -{ - "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 deleted file mode 100644 index 8d465e3..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index 0e8578d..0000000 --- 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 +++ /dev/null @@ -1,341 +0,0 @@ -{ - "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 deleted file mode 100644 index b301f23..0000000 --- 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 +++ /dev/null @@ -1,31 +0,0 @@ -# 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 deleted file mode 100644 index bf348ee..0000000 --- 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 +++ /dev/null @@ -1,417 +0,0 @@ -{ - "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 deleted file mode 100644 index d650590..0000000 --- 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 +++ /dev/null @@ -1,30 +0,0 @@ -# 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 deleted file mode 100644 index 16cb1a8..0000000 --- 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 +++ /dev/null @@ -1,417 +0,0 @@ -{ - "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 deleted file mode 100644 index 6b4b80b..0000000 --- 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 +++ /dev/null @@ -1,30 +0,0 @@ -# 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 deleted file mode 100644 index b3155d7..0000000 --- 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 +++ /dev/null @@ -1,4707 +0,0 @@ -{ - "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 deleted file mode 100644 index 5f8dc3b..0000000 --- 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 +++ /dev/null @@ -1,35 +0,0 @@ -# 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.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 deleted file mode 100644 index 12448a5..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 666ba7f..0000000 --- a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_162842/summary.md +++ /dev/null @@ -1,85 +0,0 @@ -# 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 deleted file mode 100644 index 6449f68..0000000 --- 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 +++ /dev/null @@ -1,4171 +0,0 @@ -{ - "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 deleted file mode 100644 index 0543d0f..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index 0d551a8..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 49a2b69..0000000 --- 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 +++ /dev/null @@ -1,3779 +0,0 @@ -{ - "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 deleted file mode 100644 index d3586a5..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index 87e3b4b..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index 83d2c9a..0000000 --- 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 +++ /dev/null @@ -1,4092 +0,0 @@ -{ - "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 deleted file mode 100644 index 8858984..0000000 --- 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 +++ /dev/null @@ -1,36 +0,0 @@ -# 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 deleted file mode 100644 index 40431cb..0000000 --- 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 +++ /dev/null @@ -1,4154 +0,0 @@ -{ - "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 deleted file mode 100644 index 8bae42c..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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.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 deleted file mode 100644 index 4786f23..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index d3d2afd..0000000 --- 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 +++ /dev/null @@ -1,1303 +0,0 @@ -{ - "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 deleted file mode 100644 index 86db5f1..0000000 --- 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 +++ /dev/null @@ -1,33 +0,0 @@ -# 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.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 deleted file mode 100644 index 108557a..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index d7b55d8..0000000 --- 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 +++ /dev/null @@ -1,2746 +0,0 @@ -{ - "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 deleted file mode 100644 index 2a2e869..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index e237500..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index cd1b133..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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 deleted file mode 100644 index a062465..0000000 --- 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 +++ /dev/null @@ -1,3001 +0,0 @@ -{ - "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 deleted file mode 100644 index 8d465e3..0000000 --- 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 +++ /dev/null @@ -1,32 +0,0 @@ -# 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.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 deleted file mode 100644 index b301f23..0000000 --- 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 +++ /dev/null @@ -1,31 +0,0 @@ -# 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.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 deleted file mode 100644 index 46fe6af..0000000 --- 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 +++ /dev/null @@ -1,30 +0,0 @@ -# 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.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 deleted file mode 100644 index 4bdf579..0000000 --- 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 +++ /dev/null @@ -1,30 +0,0 @@ -# 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.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 deleted file mode 100644 index 98f8b3d..0000000 --- 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 +++ /dev/null @@ -1,35 +0,0 @@ -# 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.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 deleted file mode 100644 index 55e0ffb..0000000 --- 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 +++ /dev/null @@ -1,34 +0,0 @@ -# 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 deleted file mode 100644 index a2ae98f..0000000 --- a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_163609/summary.md +++ /dev/null @@ -1,85 +0,0 @@ -# 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.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 deleted file mode 100644 index 4c1abb4..0000000 --- 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 +++ /dev/null @@ -1,247 +0,0 @@ -# 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-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 deleted file mode 100644 index cf02f94..0000000 --- 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 +++ /dev/null @@ -1,247 +0,0 @@ -# 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.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 deleted file mode 100644 index 636be0b..0000000 --- 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 +++ /dev/null @@ -1,223 +0,0 @@ -# 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-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 deleted file mode 100644 index ace2a74..0000000 --- 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 +++ /dev/null @@ -1,195 +0,0 @@ -# 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.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 deleted file mode 100644 index 6bacc06..0000000 --- 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 +++ /dev/null @@ -1,194 +0,0 @@ -# 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.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 deleted file mode 100644 index 27c5266..0000000 --- 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 +++ /dev/null @@ -1,211 +0,0 @@ -# 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-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 deleted file mode 100644 index 6599fd9..0000000 --- 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 +++ /dev/null @@ -1,211 +0,0 @@ -# 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-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 deleted file mode 100644 index f6c7dcc..0000000 --- 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 +++ /dev/null @@ -1,188 +0,0 @@ -# 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.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 deleted file mode 100644 index 6aa40ba..0000000 --- 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 +++ /dev/null @@ -1,188 +0,0 @@ -# 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.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 deleted file mode 100644 index 6cafd6c..0000000 --- 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 +++ /dev/null @@ -1,248 +0,0 @@ -# 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.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 deleted file mode 100644 index e2688c2..0000000 --- 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 +++ /dev/null @@ -1,247 +0,0 @@ -# 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 deleted file mode 100644 index 3780ae5..0000000 --- a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_164751/summary.md +++ /dev/null @@ -1,84 +0,0 @@ -# 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/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_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json similarity index 95% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json index ba60c23..f6b7b73 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Какие компоненты участвуют в ControlPlaneService?", @@ -10,7 +10,7 @@ "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Эти компоненты взаимодействуют через создание и управление каналами, обработку событий и координацию рабочих процессов. Контроль состояния осуществляется через чтение и запись атрибутов состояния.", + "llm_answer": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlChannel** – канал HTTP-контроля, этап пайплайна.\n- **HttpControlAppFactory** – фабрика создания HTTP-приложения контроля.\n- **WorkflowPersistence** – сохранение состояний рабочих процессов.\n- **InMemoryTaskQueue** – очередь задач в памяти.\n- **ConfigFileLoader** – загрузчик конфигурационных файлов.\n- **TraceContextStore** – хранилище контекстов трассировки.\n- **WorkerSupervisor** – надзор за рабочими процессами.\n- **WorkflowEngine** – движок обработки рабочих процессов.\n\nСвязи внутри ControlPlaneService:\n\n- _channels – атрибут, используемый во многих методах сервиса.\n- register_channel() – метод регистрации канала контроля.\n- start(), stop() – методы старта и остановки сервиса асинхронно.\n\nГраницы ответственности ControlPlaneService подтверждаются инициализацией, регистрацией каналов и управлением жизненным циклом сервисов.\n\nФайлы с ключевыми реализациями: \n- src/app_runtime/control/service.py\n- src/app_runtime/control/base.py\n- src/app_runtime/control/http_runner.py\n- src/app_runtime/control/http_channel.py\n- src/app_runtime/control/http_app.py\n\nВызовы fastapi app.post и app.get используются для HTTP-обработки действий контроля.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1534,36 +1534,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1591,6 +1571,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1614,6 +1601,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2885,11 +2906,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C4_SEMANTIC_ROLES": 37, - "C3_ENTRYPOINTS": 18, + "C4_SEMANTIC_ROLES": 57, + "C3_ENTRYPOINTS": 14, "C2_DEPENDENCY_GRAPH": 61, - "C1_SYMBOL_CATALOG": 24, - "C0_SOURCE_CHUNKS": 16 + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 17 } } }, @@ -2905,6 +2926,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2972,12 +2996,41 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 158, - "pre_evidence_gate": 0, - "llm": 2251 + "router": 1, + "retrieval": 177, + "pre_evidence_gate": 1, + "llm": 6818, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -4181,7 +4234,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -4194,7 +4247,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 158 + "retrieval": 177 }, "output": { "rag_count": 33, @@ -4253,11 +4306,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C4_SEMANTIC_ROLES": 37, - "C3_ENTRYPOINTS": 18, + "C4_SEMANTIC_ROLES": 57, + "C3_ENTRYPOINTS": 14, "C2_DEPENDENCY_GRAPH": 61, - "C1_SYMBOL_CATALOG": 24, - "C0_SOURCE_CHUNKS": 16 + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 17 } } }, @@ -4265,36 +4318,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 33 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 2251 + "llm": 6818 }, "output": { "prompt_name": "code_qa_architecture_answer", - "answer_preview": "В системе ControlPlaneService участвуют следующие компоненты:\n\n1. **ControlPlaneService** – главный объект управления, инициализирующий каналы и запускающий асинхронные операции. Он создает и управляет экземплярами каналов, участвующих в управлении данными и событиями.\n - Создаёт каналы с помощью " + "answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..e6b24a9 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,305 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlChannel** – канал HTTP-контроля, этап пайплайна.\n- **HttpControlAppFactory** – фабрика создания HTTP-приложения контроля.\n- **WorkflowPersistence** – сохранение состояний рабочих процессов.\n- **InMemoryTaskQueue** – очередь задач в памяти.\n- **ConfigFileLoader** – загрузчик конфигурационных файлов.\n- **TraceContextStore** – хранилище контекстов трассировки.\n- **WorkerSupervisor** – надзор за рабочими процессами.\n- **WorkflowEngine** – движок обработки рабочих процессов.\n\nСвязи внутри ControlPlaneService:\n\n- _channels – атрибут, используемый во многих методах сервиса.\n- register_channel() – метод регистрации канала контроля.\n- start(), stop() – методы старта и остановки сервиса асинхронно.\n\nГраницы ответственности ControlPlaneService подтверждаются инициализацией, регистрацией каналов и управлением жизненным циклом сервисов.\n\nФайлы с ключевыми реализациями: \n- src/app_runtime/control/service.py\n- src/app_runtime/control/base.py\n- src/app_runtime/control/http_runner.py\n- src/app_runtime/control/http_channel.py\n- src/app_runtime/control/http_app.py\n\nВызовы fastapi app.post и app.get используются для HTTP-обработки действий контроля.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 177 + }, + "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": 57, + "C3_ENTRYPOINTS": 14, + "C2_DEPENDENCY_GRAPH": 61, + "C1_SYMBOL_CATALOG": 25, + "C0_SOURCE_CHUNKS": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 6818 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha" + } + } +] + +## 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", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в ControlPlaneService:\n\n- **ControlActionSet** – модель для управления действиями.\n- **ControlChannel** – абстрактный базовый класс каналов контроля с методами start и stop.\n- **UvicornThreadRunner** – этап пайплайна для многопоточного запуска HTTP сервера.\n- **HttpControlCha" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 177, + "pre_evidence_gate": 1, + "llm": 6818, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json similarity index 95% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json index 1e733da..5bafbcb 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Какие компоненты участвуют в RuntimeManager?", @@ -10,7 +10,7 @@ "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, обмениваясь данными и событиями, участвуя в общем потоке управления и исполнения задач.", + "llm_answer": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для создания HTTP-приложений контроля. \n - Файл: `http_app.py` (строки 15–53).\n\n3. **UvicornThreadRunner** \n - Выполняет работу в потоке Uvicorn. \n - Файл: `http_runner.py` (строки 10–61).\n\n4. **HttpControlChannel** \n - Канал HTTP-контроля. \n - Файл: `http_channel.py` (строки 12–57).\n\n5. **WorkflowPersistence** \n - Сохраняет состояние рабочих процессов. \n - Файл: `workflow_persistence.py` (строки 8–54).\n\n6. **InMemoryTaskQueue** \n - Очередь задач в памяти. \n - Файл: `in_memory.py` (строки 9–38).\n\n7. **ConfigFileLoader** \n - Загружает конфигурационные файлы. \n - Файл: `file_loader.py` (строки 11–48).\n\n8. **TraceContextStore** \n - Хранит контекст трассировки. \n - Файл: `store.py` (строки 15–52).\n\n9. **WorkerSupervisor** \n - Наблюдатель за рабочими процессами. \n - Файл: `supervisor.py` (строки 10–59).\n\nСвязи внутри конструктора RuntimeManager включают инициализацию конфигурации, регистрацию сервисов и добавление конфигурационных файлов. \nФайл: `runtime.py`, строки 32–127.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1630,36 +1630,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1687,6 +1667,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1710,6 +1697,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3030,10 +3051,10 @@ }, "retrieval_by_layer_ms": { "C4_SEMANTIC_ROLES": 33, - "C3_ENTRYPOINTS": 19, - "C2_DEPENDENCY_GRAPH": 61, - "C1_SYMBOL_CATALOG": 24, - "C0_SOURCE_CHUNKS": 15 + "C3_ENTRYPOINTS": 16, + "C2_DEPENDENCY_GRAPH": 67, + "C1_SYMBOL_CATALOG": 36, + "C0_SOURCE_CHUNKS": 24 } } }, @@ -3049,6 +3070,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3116,12 +3140,41 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 155, - "pre_evidence_gate": 0, - "llm": 2995 + "router": 1, + "retrieval": 178, + "pre_evidence_gate": 1, + "llm": 9368, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -4373,7 +4426,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -4386,7 +4439,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 155 + "retrieval": 178 }, "output": { "rag_count": 33, @@ -4446,10 +4499,10 @@ }, "retrieval_by_layer_ms": { "C4_SEMANTIC_ROLES": 33, - "C3_ENTRYPOINTS": 19, - "C2_DEPENDENCY_GRAPH": 61, - "C1_SYMBOL_CATALOG": 24, - "C0_SOURCE_CHUNKS": 15 + "C3_ENTRYPOINTS": 16, + "C2_DEPENDENCY_GRAPH": 67, + "C1_SYMBOL_CATALOG": 36, + "C0_SOURCE_CHUNKS": 24 } } }, @@ -4457,36 +4510,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 33 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 2995 + "llm": 9368 }, "output": { "prompt_name": "code_qa_architecture_answer", - "answer_preview": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** — главный менеджер runtime, отвечает за конфигурацию и запуск runtime-потоков (src/app_runtime/core/runtime.py).\n2. **ControlPlaneService** — сервис управления каналами контроля, обеспечивает регистрацию каналов и ста" + "answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md new file mode 100644 index 0000000..1d63690 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -0,0 +1,305 @@ +# plba-v2-architecture-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для создания HTTP-приложений контроля. \n - Файл: `http_app.py` (строки 15–53).\n\n3. **UvicornThreadRunner** \n - Выполняет работу в потоке Uvicorn. \n - Файл: `http_runner.py` (строки 10–61).\n\n4. **HttpControlChannel** \n - Канал HTTP-контроля. \n - Файл: `http_channel.py` (строки 12–57).\n\n5. **WorkflowPersistence** \n - Сохраняет состояние рабочих процессов. \n - Файл: `workflow_persistence.py` (строки 8–54).\n\n6. **InMemoryTaskQueue** \n - Очередь задач в памяти. \n - Файл: `in_memory.py` (строки 9–38).\n\n7. **ConfigFileLoader** \n - Загружает конфигурационные файлы. \n - Файл: `file_loader.py` (строки 11–48).\n\n8. **TraceContextStore** \n - Хранит контекст трассировки. \n - Файл: `store.py` (строки 15–52).\n\n9. **WorkerSupervisor** \n - Наблюдатель за рабочими процессами. \n - Файл: `supervisor.py` (строки 10–59).\n\nСвязи внутри конструктора RuntimeManager включают инициализацию конфигурации, регистрацию сервисов и добавление конфигурационных файлов. \nФайл: `runtime.py`, строки 32–127.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 178 + }, + "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": 16, + "C2_DEPENDENCY_GRAPH": 67, + "C1_SYMBOL_CATALOG": 36, + "C0_SOURCE_CHUNKS": 24 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 9368 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для" + } + } +] + +## 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", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Компоненты, участвующие в RuntimeManager:\n\n1. **ControlPlaneService** \n - Регистрирует каналы управления (_register_channel_), запускается асинхронно (_start_async), останавливается (_stop_, _stop_async_). \n - Файлы: `service.py` (строки 14–52).\n\n2. **HttpControlAppFactory** \n - Фабрика для" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 178, + "pre_evidence_gate": 1, + "llm": 9368, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json similarity index 95% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json index 2a5103d..60170a3 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Что делает функция create_runtime?", @@ -10,7 +10,7 @@ "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`.", + "llm_answer": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если указан путь к конфигурационному файлу (`config_path`), добавляет его в менеджер.\n- Если включено управление через HTTP (`enable_http_control`), регистрирует HTTP-канал управления в плоскости контроля.\n- Регистрирует модуль приложения в менеджере времени выполнения.\n- Возвращает настроенный объект `RuntimeManager`.\n\nВходные параметры:\n- `module`: экземпляр `ApplicationModule`.\n- `config_path`: опциональный путь к конфигурационному файлу.\n- `enable_http_control`: флаг включения HTTP-контроля.\n- `control_host`, `control_port`, `control_timeout`: параметры подключения для HTTP-канала управления.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1338,36 +1338,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1395,6 +1375,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1418,6 +1405,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2591,11 +2612,11 @@ "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 + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 17 } } }, @@ -2611,6 +2632,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2678,12 +2702,41 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 113, - "pre_evidence_gate": 0, - "llm": 1394 + "router": 1, + "retrieval": 161, + "pre_evidence_gate": 1, + "llm": 4445, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -3789,7 +3842,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -3802,7 +3855,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 113 + "retrieval": 161 }, "output": { "rag_count": 33, @@ -3861,11 +3914,11 @@ "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 + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 17 } } }, @@ -3873,36 +3926,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 33 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1394 + "llm": 4445 }, "output": { "prompt_name": "code_qa_explain_answer", - "answer_preview": "Функция `create_runtime` инициализирует объект `RuntimeManager`, загружает конфигурацию из указанного файла (если путь задан), регистрирует HTTP-контроллер для управления состоянием приложения и регистрирует переданный модуль (`ApplicationModule`) в системе.\n\nКонкретно:\n1. Функция создаёт экземпляр " + "answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..e7b0f13 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,305 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если указан путь к конфигурационному файлу (`config_path`), добавляет его в менеджер.\n- Если включено управление через HTTP (`enable_http_control`), регистрирует HTTP-канал управления в плоскости контроля.\n- Регистрирует модуль приложения в менеджере времени выполнения.\n- Возвращает настроенный объект `RuntimeManager`.\n\nВходные параметры:\n- `module`: экземпляр `ApplicationModule`.\n- `config_path`: опциональный путь к конфигурационному файлу.\n- `enable_http_control`: флаг включения HTTP-контроля.\n- `control_host`, `control_port`, `control_timeout`: параметры подключения для HTTP-канала управления.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 161 + }, + "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": 49, + "C0_SOURCE_CHUNKS": 24, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4445 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если" + } + } +] + +## 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", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в модуле `src/plba/bootstrap.py`. Она создаёт и настраивает экземпляр `RuntimeManager`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP-канал управления.\n\nОсновные действия функции:\n- Инициализирует объект `RuntimeManager`.\n- Если" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 161, + "pre_evidence_gate": 1, + "llm": 4445, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json index 03b9151..c4a2606 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 устроен так?", @@ -10,7 +10,7 @@ "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`.", + "llm_answer": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фабрику и передавая обработчики здоровья и действий. \nМетоды _health_response и _action_response отвечают за обработку запросов к здоровью сервиса и выполнение действий соответственно. \nСтруктура класса ориентирована на создание отдельного HTTP-канала для управления приложением через HTTP-запросы.", "answer_mode": "answered", "path_scope": [ "src/app_runtime/control/http_channel.py" @@ -1458,9 +1458,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 23, - "C0_SOURCE_CHUNKS": 11, - "C2_DEPENDENCY_GRAPH": 13 + "C1_SYMBOL_CATALOG": 29, + "C0_SOURCE_CHUNKS": 14, + "C2_DEPENDENCY_GRAPH": 16 } } }, @@ -1474,6 +1474,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -1529,12 +1532,43 @@ "failure_reasons": [], "evidence_count": 13 }, + "evidence_gate_input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 47, - "pre_evidence_gate": 0, - "llm": 1155 + "router": 1, + "retrieval": 61, + "pre_evidence_gate": 1, + "llm": 3038, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -2043,7 +2077,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -2056,7 +2090,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 47 + "retrieval": 61 }, "output": { "rag_count": 13, @@ -2107,9 +2141,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 23, - "C0_SOURCE_CHUNKS": 11, - "C2_DEPENDENCY_GRAPH": 13 + "C1_SYMBOL_CATALOG": 29, + "C0_SOURCE_CHUNKS": 14, + "C2_DEPENDENCY_GRAPH": 16 } } }, @@ -2117,36 +2151,64 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 13 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1155 + "llm": 3038 }, "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`: фабрика при" + "answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..663d0e5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,285 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фабрику и передавая обработчики здоровья и действий. \nМетоды _health_response и _action_response отвечают за обработку запросов к здоровью сервиса и выполнение действий соответственно. \nСтруктура класса ориентирована на создание отдельного HTTP-канала для управления приложением через 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" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 61 + }, + "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": 29, + "C0_SOURCE_CHUNKS": 14, + "C2_DEPENDENCY_GRAPH": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 13 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3038 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel в файле http_channel.py наследует ControlChannel и реализует HTTP-канал управления. \nОн имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner (используя Uvicorn для запуска сервера) и factory для создания FastAPI-приложения. \nМетод start запускает с" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 61, + "pre_evidence_gate": 1, + "llm": 3038, + "post_evidence_gate": 1 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..b3254ea --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,632 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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": "Сущность RuntimeFactoryManager не найдена в доступном коде.", + "answer_mode": "not_found", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "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": "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": "Объясни класс 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": "not_found", + "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": 55, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 24, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 18 + } + } + }, + "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", + "resolved_target": null, + "answer_policy_branch": "explain_not_found", + "decision_reason": "symbol_resolution_not_found", + "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_found" + }, + "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 + }, + "evidence_gate_input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "insufficient_evidence" + ], + "timings_ms": { + "router": 2, + "retrieval": 184, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } + }, + "rag_rows": [], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 184 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 0, + "resolved_symbol_status": "not_found", + "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": 55, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 24, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 18 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met).", + "evidence_count": 0 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "symbol_resolution_not_found", + "answer_policy_branch": "explain_not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "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-trace-service.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md similarity index 54% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md index f4b5c22..7dc52a4 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -1,12 +1,12 @@ -# plba-v2-explain-trace-service +# 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml - runner: agent_runtime - mode: full_chain - passed: True ## Query -Объясни как работает класс TraceService +Объясни класс RuntimeFactoryManager ## Actual { @@ -14,12 +14,12 @@ "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", + "rag_count": 0, + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде.", + "answer_mode": "not_found", "path_scope": [], "symbol_candidates": [ - "TraceService" + "RuntimeFactoryManager" ], "layers": [ "C1_SYMBOL_CATALOG", @@ -36,7 +36,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 2 }, "output": { "intent": "CODE_QA", @@ -49,13 +49,13 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 147 + "retrieval": 184 }, "output": { "rag_count": 33, - "answer_path_rag_count": 33, - "resolved_symbol_status": "resolved", - "resolved_symbol": "TraceService", + "answer_path_rag_count": 0, + "resolved_symbol_status": "not_found", + "resolved_symbol": null, "requested_layers": [ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", @@ -108,48 +108,67 @@ "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 + "C1_SYMBOL_CATALOG": 55, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 24, + "C2_DEPENDENCY_GRAPH": 59, + "C3_ENTRYPOINTS": 18 } } }, { "step": "pre_evidence_gate", - "status": "passed", + "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] }, "output": { - "passed": true, - "failure_reasons": [], - "degraded_message": "" + "passed": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met).", + "evidence_count": 0 } }, { "step": "llm", - "status": "completed", + "status": "skipped", "timings_ms": { - "llm": 1347 + "llm": 1 }, "output": { - "prompt_name": "code_qa_explain_answer", - "answer_preview": "Класс `TraceService` определяется в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory`.\n\nЕго основные обязанности:\n- Инициализация при создании через параметры `transport` и `store`, с возможностью использования стандартных реализаций (`NoOpTraceTransport` и `TraceCont" + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "symbol_resolution_not_found", + "answer_policy_branch": "explain_not_found" } }, { "step": "post_evidence_gate", - "status": "passed", + "status": "skipped", "timings_ms": { - "post_evidence_gate": 0, - "repair": 0 + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null }, "output": { - "passed": true, - "reasons": [], - "repair_used": false + "reason": "no_draft_answer" } } ] @@ -157,7 +176,7 @@ ## Diagnostics { "intent_correct": null, - "target_found": true, + "target_found": false, "layers_used": [ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", @@ -165,8 +184,11 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "retrieval_sufficient": true, - "answer_mode": "normal", + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "resolved_target": null, + "answer_policy_branch": "explain_not_found", + "decision_reason": "symbol_resolution_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -181,11 +203,11 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "resolved" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", - "query": "Объясни как работает класс TraceService", + "query": "Объясни класс RuntimeFactoryManager", "sub_intent": "EXPLAIN", "path_scope": [], "requested_layers": [ @@ -199,47 +221,79 @@ "per_layer_outcome": [ { "layer_id": "C1_SYMBOL_CATALOG", - "hit_count": 8, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 8, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C4_SEMANTIC_ROLES", - "hit_count": 8, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C2_DEPENDENCY_GRAPH", - "hit_count": 6, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C3_ENTRYPOINTS", - "hit_count": 3, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false } ], - "empty_layers": [], + "empty_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], "evidence_gate_decision": { - "sufficient": true, - "failure_reasons": [], - "evidence_count": 33 + "sufficient": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "evidence_count": 0 }, - "failure_reasons": [], + "evidence_gate_input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "insufficient_evidence" + ], "timings_ms": { - "router": 0, - "retrieval": 147, - "pre_evidence_gate": 0, - "llm": 1347 + "router": 2, + "retrieval": 184, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } } 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json similarity index 96% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json index 1483a68..e95197d 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Объясни как работает класс RuntimeManager", @@ -10,7 +10,7 @@ "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` играет ключевую управляющую роль в системе, вероятно, интегрируя и координируя другие компоненты и модули.", + "llm_answer": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `RuntimeManager.configuration`\n- `RuntimeManager.add_config_file`\n\nСвязи и вызовы других сущностей не указаны явно в данном контексте, но известно, что `RuntimeManager` используется в службах контроля (`ControlPlaneService`) и взаимодействует с ними через методы старта, стопа и получения снимков состояния.\n\nДополнительные детали о взаимодействии с другими компонентами отсутствуют в представленном контексте.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1521,36 +1521,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1578,6 +1558,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1601,6 +1588,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2870,11 +2891,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 76, - "C0_SOURCE_CHUNKS": 20, + "C1_SYMBOL_CATALOG": 68, + "C0_SOURCE_CHUNKS": 25, "C4_SEMANTIC_ROLES": 22, - "C2_DEPENDENCY_GRAPH": 62, - "C3_ENTRYPOINTS": 12 + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 17 } } }, @@ -2890,6 +2911,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2957,12 +2981,41 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 194, - "pre_evidence_gate": 0, - "llm": 1244 + "router": 1, + "retrieval": 195, + "pre_evidence_gate": 1, + "llm": 3442, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -4164,7 +4217,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -4177,7 +4230,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 194 + "retrieval": 195 }, "output": { "rag_count": 33, @@ -4236,11 +4289,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 76, - "C0_SOURCE_CHUNKS": 20, + "C1_SYMBOL_CATALOG": 68, + "C0_SOURCE_CHUNKS": 25, "C4_SEMANTIC_ROLES": 22, - "C2_DEPENDENCY_GRAPH": 62, - "C3_ENTRYPOINTS": 12 + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 17 } } }, @@ -4248,36 +4301,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 33 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1244 + "llm": 3442 }, "output": { "prompt_name": "code_qa_explain_answer", - "answer_preview": "Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков:\n\n1. Класс имеет ответственность за управление состоянием и конфигурацией runtime" + "answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..541464f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,305 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `RuntimeManager.configuration`\n- `RuntimeManager.add_config_file`\n\nСвязи и вызовы других сущностей не указаны явно в данном контексте, но известно, что `RuntimeManager` используется в службах контроля (`ControlPlaneService`) и взаимодействует с ними через методы старта, стопа и получения снимков состояния.\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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 195 + }, + "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": 68, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3442 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim" + } + } +] + +## 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", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow.\n\nКонструктор `RuntimeManager.__init__` инициализирует объект и вызывает:\n- `Runtim" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 195, + "pre_evidence_gate": 1, + "llm": 3442, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json similarity index 96% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json index 4ea380a..8463d28 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Объясни как работает класс TraceService", @@ -10,7 +10,7 @@ "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Детали реализации зависят от конкретных методов, таких как инициализация транспорта и контекста, а также запись записей трассировки в хранилище.", + "llm_answer": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если транспорт или хранилище не указаны, используются реализации по умолчанию: `NoOpTraceTransport()` и `TraceContextStore()`.\n \n- **Метод `create_context`**: создаёт новый контекст трассировки, принимая параметры `alias`, `parent_id`, `kind` и `attrs`. В нём создаётся запись контекста трассировки с уникальным идентификатором, текущим временем и переданными параметрами, затем эта запись сохраняется в хранилище.\n\nТакже определены методы `open_context`, `close_context`, `current_trace_id`, но их реализация не приведена в контексте.\n\nОсторожный вывод: `TraceService` используется для управления контекстами трассировки приложения, позволяя создавать, открывать и управлять записями трассировок. Он играет ключевую роль в инфраструктуре отслеживания и логирования внутри приложения. \n\nФакты основаны на видимом фрагменте кода.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1524,36 +1524,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1581,6 +1561,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1604,6 +1591,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2873,11 +2894,11 @@ "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 + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 17 } } }, @@ -2893,6 +2914,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2960,12 +2984,41 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 147, - "pre_evidence_gate": 0, - "llm": 1347 + "router": 2, + "retrieval": 156, + "pre_evidence_gate": 1, + "llm": 5609, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -4167,7 +4220,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 2 }, "output": { "intent": "CODE_QA", @@ -4180,7 +4233,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 147 + "retrieval": 156 }, "output": { "rag_count": 33, @@ -4239,11 +4292,11 @@ "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 + "C1_SYMBOL_CATALOG": 50, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 17 } } }, @@ -4251,36 +4304,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 33 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1347 + "llm": 5609 }, "output": { "prompt_name": "code_qa_explain_answer", - "answer_preview": "Класс `TraceService` определяется в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory`.\n\nЕго основные обязанности:\n- Инициализация при создании через параметры `transport` и `store`, с возможностью использования стандартных реализаций (`NoOpTraceTransport` и `TraceCont" + "answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..baf3eb0 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,305 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если транспорт или хранилище не указаны, используются реализации по умолчанию: `NoOpTraceTransport()` и `TraceContextStore()`.\n \n- **Метод `create_context`**: создаёт новый контекст трассировки, принимая параметры `alias`, `parent_id`, `kind` и `attrs`. В нём создаётся запись контекста трассировки с уникальным идентификатором, текущим временем и переданными параметрами, затем эта запись сохраняется в хранилище.\n\nТакже определены методы `open_context`, `close_context`, `current_trace_id`, но их реализация не приведена в контексте.\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" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 156 + }, + "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": 50, + "C0_SOURCE_CHUNKS": 18, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 50, + "C3_ENTRYPOINTS": 17 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 5609 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра" + } + } +] + +## 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", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследуется от `TraceContextFactory`.\n\nОсновные компоненты:\n\n- **Конструктор (`__init__`)**: принимает параметры `transport` и `store`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если тра" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 2, + "retrieval": 156, + "pre_evidence_gate": 1, + "llm": 5609, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json similarity index 87% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json index bab51a9..03ca84f 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Найди точки входа HTTP control plane", @@ -10,7 +10,7 @@ "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)", + "llm_answer": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n\nКандидаты на входы не требуются, так как все маршруты уже подтверждены.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -135,13 +135,9 @@ } }, "symbol_resolution": { - "status": "pending", + "status": "not_found", "resolved_symbol": null, - "alternatives": [ - "HTTP", - "control", - "plane" - ], + "alternatives": [], "confidence": 0.0 }, "evidence_policy": { @@ -524,36 +520,16 @@ ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -581,6 +557,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -604,6 +587,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -922,18 +939,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -941,9 +960,16 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 11, - "C0_SOURCE_CHUNKS": 21 - } + "C3_ENTRYPOINTS": 16, + "C0_SOURCE_CHUNKS": 12 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, "diagnostics": { @@ -955,6 +981,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -966,7 +995,7 @@ "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -998,8 +1027,42 @@ "failure_reasons": [], "evidence_count": 9 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 38, + "pre_evidence_gate": 1, + "llm": 2451, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -1298,6 +1361,139 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 38 + }, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 16, + "C0_SOURCE_CHUNKS": 12 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 9 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2451 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..3143dd5 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,262 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n\nКандидаты на входы не требуются, так как все маршруты уже подтверждены.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 38 + }, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 16, + "C0_SOURCE_CHUNKS": 12 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 9 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2451 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n- GET /health, объявлен в src/app_runtime/control/http_app.py, строки 31-34, обработчик health\n- GET /actions/{action}, объявлен в src/app_runtime/control/http_app.py, строки 38-42, обработчик action\n- POST /actions/{action}, объявлен в src/app_runtime/control/http_app.p" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 38, + "pre_evidence_gate": 1, + "llm": 2451, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json similarity index 79% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json index 0c1fe54..29d5b1e 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где health endpoint?", @@ -9,8 +9,8 @@ "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 не обнаружен среди зарегистрированных маршрутов.", + "rag_count": 10, + "llm_answer": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -22,10 +22,8 @@ "C0_SOURCE_CHUNKS" ] }, - "passed": false, - "mismatches": [ - "llm: expected answer to contain 'GET /health'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Где health endpoint?", "router_result": { @@ -488,28 +486,22 @@ "last_modified": null, "staleness_score": null } - } - ], - "relations": [], - "entrypoints": [ + }, { + "layer": "C0_SOURCE_CHUNKS", "path": "src/app_runtime/control/http_app.py", - "title": "app.post", + "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": { - "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", - "entry_type": "http", - "framework": "fastapi", - "route_or_command": "app.post", - "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", "is_test": false, - "lang_payload": { - "methods": [ - "POST" - ] - }, - "artifact_type": null, "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", "repo_id": "plba", + "artifact_type": null, "section": null, "doc_id": null, "doc_version": null, @@ -518,10 +510,20 @@ "last_modified": null, "staleness_score": null } - }, + } + ], + "relations": [], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -549,6 +551,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -572,6 +581,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -584,7 +627,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -881,6 +924,36 @@ "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 + } } ], "retrieval_report": { @@ -890,18 +963,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -909,9 +984,16 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 28, - "C0_SOURCE_CHUNKS": 18 - } + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 15 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, "diagnostics": { @@ -923,6 +1005,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -955,7 +1040,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -964,14 +1049,43 @@ "evidence_gate_decision": { "sufficient": true, "failure_reasons": [], - "evidence_count": 9 + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 46, - "pre_evidence_gate": 0, - "llm": 1055 + "router": 1, + "retrieval": 56, + "pre_evidence_gate": 1, + "llm": 1462, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -1265,6 +1379,36 @@ "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 + } } ], "validation": { @@ -1277,7 +1421,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -1290,11 +1434,11 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 46 + "retrieval": 56 }, "output": { - "rag_count": 9, - "answer_path_rag_count": 9, + "rag_count": 10, + "answer_path_rag_count": 10, "resolved_symbol_status": "not_found", "resolved_symbol": null, "requested_layers": [ @@ -1309,18 +1453,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -1328,45 +1474,78 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 28, - "C0_SOURCE_CHUNKS": 18 - } + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 15 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, { "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 10 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1055 + "llm": 1462 }, "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." + "answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..4b489c1 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,261 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_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": 10, + "llm_answer": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 56 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 34, + "C0_SOURCE_CHUNKS": 15 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1462 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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": 7, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 56, + "pre_evidence_gate": 1, + "llm": 1462, + "post_evidence_gate": 1 + } +} + +## 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-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json similarity index 96% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json index a33cda0..000671e 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для create_runtime?", @@ -10,7 +10,7 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 24, - "llm_answer": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест расположен в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует.", + "llm_answer": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1901,9 +1901,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 33, - "C2_DEPENDENCY_GRAPH": 38, - "C0_SOURCE_CHUNKS": 13 + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 10 } } }, @@ -1917,6 +1917,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -1968,12 +1971,41 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`." + } + }, "failure_reasons": [], "timings_ms": { "router": 1, - "retrieval": 85, - "pre_evidence_gate": 0, - "llm": 611 + "retrieval": 64, + "pre_evidence_gate": 1, + "llm": 1663, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -2769,7 +2801,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 85 + "retrieval": 64 }, "output": { "rag_count": 24, @@ -2814,9 +2846,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 33, - "C2_DEPENDENCY_GRAPH": 38, - "C0_SOURCE_CHUNKS": 13 + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 10 } } }, @@ -2824,36 +2856,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 24 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 611 + "llm": 1663 }, "output": { "prompt_name": "code_qa_find_tests_answer", - "answer_preview": "Прямых тестов для `create_runtime` не обнаружено. Ближайший тест расположен в файле `tests/test_runtime.py`, но он проверяет экспорт публичных контрактов пакета PLBA, а не непосредственно сам метод `create_runtime`. Косвенное покрытие отсутствует." + "answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`." } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..06dbc0f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,269 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `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": 64 + }, + "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": 24, + "C2_DEPENDENCY_GRAPH": 29, + "C0_SOURCE_CHUNKS": 10 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1663 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая `create_runtime`." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 64, + "pre_evidence_gate": 1, + "llm": 1663, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json similarity index 97% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json index fe9f75a..763215d 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для RuntimeManager?", @@ -10,7 +10,7 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 24, - "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено.", + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -2192,9 +2192,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 58, - "C2_DEPENDENCY_GRAPH": 58, - "C0_SOURCE_CHUNKS": 24 + "C1_SYMBOL_CATALOG": 48, + "C2_DEPENDENCY_GRAPH": 59, + "C0_SOURCE_CHUNKS": 21 } } }, @@ -2208,6 +2208,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2259,12 +2262,41 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + }, "failure_reasons": [], "timings_ms": { "router": 1, - "retrieval": 141, - "pre_evidence_gate": 0, - "llm": 584 + "retrieval": 129, + "pre_evidence_gate": 1, + "llm": 1551, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -3156,7 +3188,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 141 + "retrieval": 129 }, "output": { "rag_count": 24, @@ -3201,9 +3233,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 58, - "C2_DEPENDENCY_GRAPH": 58, - "C0_SOURCE_CHUNKS": 24 + "C1_SYMBOL_CATALOG": 48, + "C2_DEPENDENCY_GRAPH": 59, + "C0_SOURCE_CHUNKS": 21 } } }, @@ -3211,36 +3243,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 24 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 584 + "llm": 1551 }, "output": { "prompt_name": "code_qa_find_tests_answer", - "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено." + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..a4e89a9 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,269 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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`.\n\nКосвенные тесты:\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" + ] +} + +## 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": 129 + }, + "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": 48, + "C2_DEPENDENCY_GRAPH": 59, + "C0_SOURCE_CHUNKS": 21 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1551 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 129, + "pre_evidence_gate": 1, + "llm": 1551, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json similarity index 97% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json index 353a6c0..38f1f7a 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для TraceService?", @@ -10,7 +10,7 @@ "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).", + "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": [ @@ -2193,9 +2193,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 36, - "C2_DEPENDENCY_GRAPH": 31, - "C0_SOURCE_CHUNKS": 12 + "C1_SYMBOL_CATALOG": 41, + "C2_DEPENDENCY_GRAPH": 42, + "C0_SOURCE_CHUNKS": 35 } } }, @@ -2209,6 +2209,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2260,12 +2263,41 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 80, - "pre_evidence_gate": 0, - "llm": 820 + "router": 1, + "retrieval": 119, + "pre_evidence_gate": 1, + "llm": 2200, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -3144,7 +3176,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -3157,7 +3189,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 80 + "retrieval": 119 }, "output": { "rag_count": 24, @@ -3202,9 +3234,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 36, - "C2_DEPENDENCY_GRAPH": 31, - "C0_SOURCE_CHUNKS": 12 + "C1_SYMBOL_CATALOG": 41, + "C2_DEPENDENCY_GRAPH": 42, + "C0_SOURCE_CHUNKS": 35 } } }, @@ -3212,36 +3244,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 24 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 820 + "llm": 2200 }, "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- " + "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- `test_trace_service_s", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_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- `test_trace_service_s" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..fe688c2 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,269 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 119 + }, + "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": 41, + "C2_DEPENDENCY_GRAPH": 42, + "C0_SOURCE_CHUNKS": 35 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2200 + }, + "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- `test_trace_service_s", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 119, + "pre_evidence_gate": 1, + "llm": 2200, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json similarity index 98% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json index 049066a..7815d88 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для WorkflowRuntimeFactory?", @@ -2086,9 +2086,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 27, - "C2_DEPENDENCY_GRAPH": 29, - "C0_SOURCE_CHUNKS": 17 + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 36, + "C0_SOURCE_CHUNKS": 20 } } }, @@ -2102,6 +2102,9 @@ ], "retrieval_sufficient": false, "answer_mode": "degraded", + "resolved_target": "WorkflowRuntimeFactory", + "answer_policy_branch": "evidence_gate_short_circuit", + "decision_reason": "tests_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2155,13 +2158,36 @@ ], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "tests_not_found" ], "timings_ms": { - "router": 0, - "retrieval": 74, - "pre_evidence_gate": 0 + "router": 1, + "retrieval": 82, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -3010,7 +3036,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -3023,7 +3049,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 74 + "retrieval": 82 }, "output": { "rag_count": 24, @@ -3068,9 +3094,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 27, - "C2_DEPENDENCY_GRAPH": 29, - "C0_SOURCE_CHUNKS": 17 + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 36, + "C0_SOURCE_CHUNKS": 20 } } }, @@ -3078,27 +3104,53 @@ "step": "pre_evidence_gate", "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": false, "failure_reasons": [ "tests_not_found" ], - "degraded_message": "Insufficient evidence for a confident answer. No test candidates found." + "degraded_message": "Insufficient evidence for a confident answer. No test candidates found.", + "evidence_count": 24 } }, { "step": "llm", "status": "skipped", + "timings_ms": { + "llm": 1 + }, "output": { "reason": "policy_short_circuit", - "answer_mode": "degraded" + "answer_mode": "degraded", + "decision_reason": "tests_not_found", + "answer_policy_branch": "evidence_gate_short_circuit" } }, { "step": "post_evidence_gate", "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, "output": { "reason": "no_draft_answer" } 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md similarity index 69% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md index 4c62657..a87b0c0 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -1,6 +1,6 @@ # 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml - runner: agent_runtime - mode: full_chain - passed: True @@ -34,7 +34,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -47,7 +47,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 74 + "retrieval": 82 }, "output": { "rag_count": 24, @@ -92,9 +92,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 27, - "C2_DEPENDENCY_GRAPH": 29, - "C0_SOURCE_CHUNKS": 17 + "C1_SYMBOL_CATALOG": 24, + "C2_DEPENDENCY_GRAPH": 36, + "C0_SOURCE_CHUNKS": 20 } } }, @@ -102,27 +102,53 @@ "step": "pre_evidence_gate", "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": false, "failure_reasons": [ "tests_not_found" ], - "degraded_message": "Insufficient evidence for a confident answer. No test candidates found." + "degraded_message": "Insufficient evidence for a confident answer. No test candidates found.", + "evidence_count": 24 } }, { "step": "llm", "status": "skipped", + "timings_ms": { + "llm": 1 + }, "output": { "reason": "policy_short_circuit", - "answer_mode": "degraded" + "answer_mode": "degraded", + "decision_reason": "tests_not_found", + "answer_policy_branch": "evidence_gate_short_circuit" } }, { "step": "post_evidence_gate", "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, "output": { "reason": "no_draft_answer" } @@ -140,6 +166,9 @@ ], "retrieval_sufficient": false, "answer_mode": "degraded", + "resolved_target": "WorkflowRuntimeFactory", + "answer_policy_branch": "evidence_gate_short_circuit", + "decision_reason": "tests_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -193,13 +222,36 @@ ], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "tests_not_found" ], "timings_ms": { - "router": 0, - "retrieval": 74, - "pre_evidence_gate": 0 + "router": 1, + "retrieval": 82, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } } 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json similarity index 83% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json index d481c08..73dc7e5 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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", @@ -266,7 +266,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 10 + "C0_SOURCE_CHUNKS": 14 } } }, @@ -278,6 +278,9 @@ ], "retrieval_sufficient": false, "answer_mode": "insufficient", + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "answer_policy_branch": "open_file_not_found", + "decision_reason": "path_scope_empty", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -322,14 +325,39 @@ ], "evidence_count": 0 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "path_scope_empty", "layer_c0_empty" ], "timings_ms": { - "router": 0, - "retrieval": 10, - "pre_evidence_gate": 0 + "router": 1, + "retrieval": 15, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } }, "rag_rows": [], @@ -343,7 +371,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -356,7 +384,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 10 + "retrieval": 15 }, "output": { "rag_count": 0, @@ -396,7 +424,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 10 + "C0_SOURCE_CHUNKS": 14 } } }, @@ -404,7 +432,21 @@ "step": "pre_evidence_gate", "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] }, "output": { "passed": false, @@ -412,20 +454,34 @@ "path_scope_empty", "layer_c0_empty" ], - "degraded_message": "Insufficient evidence for a confident answer. No matching path or file found. No code chunks retrieved." + "degraded_message": "Insufficient evidence for a confident answer. No matching path or file found. No code chunks retrieved.", + "evidence_count": 0 } }, { "step": "llm", "status": "skipped", + "timings_ms": { + "llm": 1 + }, "output": { "reason": "policy_short_circuit", - "answer_mode": "not_found" + "answer_mode": "not_found", + "decision_reason": "path_scope_empty", + "answer_policy_branch": "open_file_not_found" } }, { "step": "post_evidence_gate", "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, "output": { "reason": "no_draft_answer" } 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md similarity index 67% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md index 79babdc..8f60590 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -1,6 +1,6 @@ # 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml - runner: agent_runtime - mode: full_chain - passed: True @@ -32,7 +32,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -45,7 +45,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 10 + "retrieval": 15 }, "output": { "rag_count": 0, @@ -85,7 +85,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 10 + "C0_SOURCE_CHUNKS": 14 } } }, @@ -93,7 +93,21 @@ "step": "pre_evidence_gate", "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] }, "output": { "passed": false, @@ -101,20 +115,34 @@ "path_scope_empty", "layer_c0_empty" ], - "degraded_message": "Insufficient evidence for a confident answer. No matching path or file found. No code chunks retrieved." + "degraded_message": "Insufficient evidence for a confident answer. No matching path or file found. No code chunks retrieved.", + "evidence_count": 0 } }, { "step": "llm", "status": "skipped", + "timings_ms": { + "llm": 1 + }, "output": { "reason": "policy_short_circuit", - "answer_mode": "not_found" + "answer_mode": "not_found", + "decision_reason": "path_scope_empty", + "answer_policy_branch": "open_file_not_found" } }, { "step": "post_evidence_gate", "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, "output": { "reason": "no_draft_answer" } @@ -130,6 +158,9 @@ ], "retrieval_sufficient": false, "answer_mode": "insufficient", + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "answer_policy_branch": "open_file_not_found", + "decision_reason": "path_scope_empty", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -174,14 +205,39 @@ ], "evidence_count": 0 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "path_scope_empty", "layer_c0_empty" ], "timings_ms": { - "router": 0, - "retrieval": 10, - "pre_evidence_gate": 0 + "router": 1, + "retrieval": 15, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } } 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json similarity index 69% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json index 6e26093..435f2a9 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Открой файл src/plba/__init__.py", @@ -10,7 +10,7 @@ "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", + "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`, `Worker`, `WorkerHealth`\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`: различные классы для работы с workflow\n\nЭто инициализационный скрипт пакета `plba`, обеспечивающий доступ ко всем основным функциональным блокам пакета.", "answer_mode": "answered", "path_scope": [ "src/plba/__init__.py" @@ -322,7 +322,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 43 + "C0_SOURCE_CHUNKS": 24 } } }, @@ -334,6 +334,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -373,8 +376,44 @@ "failure_reasons": [], "evidence_count": 1 }, + "evidence_gate_input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: н", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: н" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 25, + "pre_evidence_gate": 1, + "llm": 4851, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -412,6 +451,133 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 25 + }, + "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": 1 + }, + "input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4851 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "Файл `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`: н", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: н", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: н" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..60f4d37 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,250 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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.bootstrap`: `create_runtime`\n- Из `plba.config`: `ConfigFileLoader`, `FileConfigProvider`\n- Из `plba.control`: `ControlActionSet`, `ControlChannel`, `ControlPlaneService`, `HttpControlChannel`\n- Из `plba.contracts`: несколько контрактов, таких как `ApplicationModule`, `ConfigProvider`, `Worker`, `WorkerHealth`\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`: различные классы для работы с workflow\n\nЭто инициализационный скрипт пакета `plba`, обеспечивающий доступ ко всем основным функциональным блокам пакета.", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 25 + }, + "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": 1 + }, + "input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4851 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "Файл `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`: н", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: н", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: н" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: н", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: н" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 25, + "pre_evidence_gate": 1, + "llm": 4851, + "post_evidence_gate": 1 + } +} + +## 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-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json similarity index 79% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json index 7d7cfe4..6ddbd1d 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Открой файл src/app_runtime/core/runtime.py", @@ -10,7 +10,7 @@ "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`, а также параметрами конфигурации и сервисов, которые могут передаваться при создании экземпляра класса.", + "llm_answer": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `ConfigurationManager`\n- `services`: экземпляр `ServiceContainer`\n- `traces`: экземпляр `TraceService`\n- `health`: экземпляр `HealthRegistry`\n- `logs`: экземпляр `LogManager`\n- `workers`: экземпляр `WorkerSupervisor`\n- `control_plane`: экземпляр `ControlPlaneService`\n\nВсе эти поля могут принимать значения по умолчанию, если при создании объекта явные аргументы не указаны.", "answer_mode": "answered", "path_scope": [ "src/app_runtime/core/runtime.py" @@ -322,7 +322,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 218 + "C0_SOURCE_CHUNKS": 136 } } }, @@ -334,6 +334,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -373,8 +376,44 @@ "failure_reasons": [], "evidence_count": 1 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 137, + "pre_evidence_gate": 1, + "llm": 3254, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -412,6 +451,133 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 137 + }, + "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": 136 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3254 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..271d2e1 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,250 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `ConfigurationManager`\n- `services`: экземпляр `ServiceContainer`\n- `traces`: экземпляр `TraceService`\n- `health`: экземпляр `HealthRegistry`\n- `logs`: экземпляр `LogManager`\n- `workers`: экземпляр `WorkerSupervisor`\n- `control_plane`: экземпляр `ControlPlaneService`\n\nВсе эти поля могут принимать значения по умолчанию, если при создании объекта явные аргументы не указаны.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 137 + }, + "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": 136 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3254 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nВ конструкторе (`__init__`) инициализируются следующие поля объекта:\n- `configuration`: экземпляр `Configurat" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 137, + "pre_evidence_gate": 1, + "llm": 3254, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json similarity index 96% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json index 5eae58c..f09dd7f 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Покажи как проходит запрос /health в HttpControlAppFactory", @@ -10,7 +10,7 @@ "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Таким образом, ключевой элемент — провайдер здоровья, определяющий текущее состояние системы и возвращающий соответствующий объект состояния.", + "llm_answer": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health` вызывается этот обработчик, который асинхронно вызывает провайдер здоровья (`health_provider`), переданный в фабрику.\n4. Приложение обернуто middleware для логирования времени ответа, которое добавляется в заголовок X-Response-Time-Ms.\n\nЦепочка вызовов завершается на уровне фабрики, конкретных имплементаций провайдера здоровья в данном контексте нет.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1769,36 +1769,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1826,6 +1806,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1849,6 +1836,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3270,11 +3291,11 @@ "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 + "C1_SYMBOL_CATALOG": 67, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 19 } } }, @@ -3290,6 +3311,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3357,12 +3381,41 @@ "failure_reasons": [], "evidence_count": 37 }, + "evidence_gate_input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 169, - "pre_evidence_gate": 0, - "llm": 1342 + "router": 1, + "retrieval": 197, + "pre_evidence_gate": 1, + "llm": 3593, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -4716,7 +4769,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -4729,7 +4782,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 169 + "retrieval": 197 }, "output": { "rag_count": 37, @@ -4788,11 +4841,11 @@ "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 + "C1_SYMBOL_CATALOG": 67, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 19 } } }, @@ -4800,36 +4853,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 37 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1342 + "llm": 3593 }, "output": { "prompt_name": "code_qa_trace_flow_answer", - "answer_preview": "Поток выполнения запроса `/health` в `HttpControlAppFactory` выглядит следующим образом:\n\n1. Запрос приходит на маршрут `/health`.\n2. Контроллер вызывает метод `health()` внутри фабрики, который объявлен в классе `HttpControlAppFactory`.\n3. Внутри метода `health()` фабрика ожидает асинхронный резуль" + "answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..2b7404a --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,306 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health` вызывается этот обработчик, который асинхронно вызывает провайдер здоровья (`health_provider`), переданный в фабрику.\n4. Приложение обернуто middleware для логирования времени ответа, которое добавляется в заголовок X-Response-Time-Ms.\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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 197 + }, + "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": 67, + "C0_SOURCE_CHUNKS": 27, + "C4_SEMANTIC_ROLES": 22, + "C2_DEPENDENCY_GRAPH": 60, + "C3_ENTRYPOINTS": 19 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3593 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health" + } + } +] + +## 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", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос /health обрабатывается следующим образом:\n\n1. В файле `http_app.py` класс `HttpControlAppFactory` создаёт объект FastAPI с маршрутом `/health`.\n2. Маршрут `/health` сопоставлен с функцией-обработчиком `health`, определённой внутри фабрики на строках 31–34.\n3. При обращении к маршруту `/health" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 197, + "pre_evidence_gate": 1, + "llm": 3593, + "post_evidence_gate": 1 + } +} + +## 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_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json similarity index 96% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json index f9f57c2..95b4a91 100644 --- 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_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Покажи поток выполнения при запуске RuntimeManager", @@ -10,7 +10,7 @@ "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Полностью проследить весь поток данных не удалось из-за недостаточного количества информации.", + "llm_answer": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри конструктора, вызывая сам конструктор (`__init__`) и регистрируя основные сервисы методом `_register_core_services`.\n\n2. Начальная инициализация состояния:\n - Внутри конструктора происходит начальное чтение и запись атрибутов состояния, необходимых для работы менеджера.\n\n3. Запуск менеджера:\n - После полной инициализации выполняется метод `start`, который приводит `RuntimeManager` в активное состояние и начинает обработку запросов.\n\nПоток данных включает в себя загрузку конфигурации, создание и регистрацию сервисов, а также переход в рабочее состояние.\n\nДальнейшее восстановление потока возможно только по дополнительным данным.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -1835,36 +1835,16 @@ } ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1892,6 +1872,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1915,6 +1902,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3384,11 +3405,11 @@ "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 + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 23, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 22 } } }, @@ -3404,6 +3425,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3471,12 +3495,41 @@ "failure_reasons": [], "evidence_count": 37 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 153, - "pre_evidence_gate": 0, - "llm": 1356 + "router": 1, + "retrieval": 187, + "pre_evidence_gate": 1, + "llm": 4010, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -4878,7 +4931,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -4891,7 +4944,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 153 + "retrieval": 187 }, "output": { "rag_count": 37, @@ -4950,11 +5003,11 @@ "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 + "C1_SYMBOL_CATALOG": 52, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 23, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 22 } } }, @@ -4962,36 +5015,62 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 37 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1356 + "llm": 4010 }, "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" + "answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/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_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..4a32a37 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,305 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри конструктора, вызывая сам конструктор (`__init__`) и регистрируя основные сервисы методом `_register_core_services`.\n\n2. Начальная инициализация состояния:\n - Внутри конструктора происходит начальное чтение и запись атрибутов состояния, необходимых для работы менеджера.\n\n3. Запуск менеджера:\n - После полной инициализации выполняется метод `start`, который приводит `RuntimeManager` в активное состояние и начинает обработку запросов.\n\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" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 187 + }, + "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": 52, + "C0_SOURCE_CHUNKS": 25, + "C4_SEMANTIC_ROLES": 23, + "C2_DEPENDENCY_GRAPH": 63, + "C3_ENTRYPOINTS": 22 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4010 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри" + } + } +] + +## 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", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации и сервисов:\n - В конструкторе `RuntimeManager.__init__` инициализируется конфигурация через поле `configuration`, загружаются файлы конфигурации с помощью метода `add_config_file`.\n - Создаются сервисы внутри" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 187, + "pre_evidence_gate": 1, + "llm": 4010, + "post_evidence_gate": 1 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/summary.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/summary.md new file mode 100644 index 0000000..9717c0f --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_174008/summary.md @@ -0,0 +1,80 @@ +# pipeline_setup_v3 summary + +Passed: 18/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:7, 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 | — | ✓ | + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > В файле \`src/app\_runtime/core/runtime.py\` определён класс \`RuntimeManager\`. У него есть несколько атрибутов класса: \- \`ACTION\_TIMEOUT\_SECONDS = 10.0\` \- \`ACTION\_POLL\_INTERVAL\_SECONDS = 0.05\` В конструкторе \(\`\_\_init\_\_\`\) инициализируются следующие поля объекта: \- \`configuration\`: экземпляр \`ConfigurationManager\` \- \`services\`: экземпляр \`ServiceContainer\` \- \`traces\`: экземпляр \`TraceService\` \- \`health\`: экземпляр \`HealthRegistry\` \- \`logs\`: экземпляр \`LogManager\` \- \`workers\`: экземпляр \`WorkerSupervisor\` \- \`control\_plane\`: экземпляр \`ControlPlaneService\` Все эти поля могут принимать значения по умолчанию, если при создании объекта явные аргументы не указаны. +- **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\`, \`Worker\`, \`WorkerHealth\` \- Из \`plba.core\`: \`ConfigurationManager\`, \`RuntimeManager\`, \`ServiceContainer\` \- Из \`plba.health\`: \`HealthRegistry\` \- Из \`plba.logging\`: \`LogManager\` \- Из \`plba.queue\`: \`InMemoryTaskQueue\` \- Из \`plba.tracing\`: \`MySqlTraceTransport\`, \`NoOpTraceTransport\`, \`TraceService\` \- Из \`plba.workflow\`: различные классы для работы с workflow Это инициализационный скрипт пакета \`plba\`, обеспечивающий доступ ко всем основным функциональным блокам пакета. +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Класс \`RuntimeManager\` определён в файле \`src/app\_runtime/core/runtime.py\` и имеет responsibilities характерные для менеджера: управляет конфигурацией, состоянием и участвует в потоках данных через 50 срезов dataflow. Конструктор \`RuntimeManager.\_\_init\_\_\` инициализирует объект и вызывает: \- \`RuntimeManager.configuration\` \- \`RuntimeManager.add\_config\_file\` Связи и вызовы других сущностей не указаны явно в данном контексте, но известно, что \`RuntimeManager\` используется в службах контроля \(\`ControlPlaneService\`\) и взаимодействует с ними через методы старта, стопа и получения снимков состояния. Дополнительные детали о взаимодействии с другими компонентами отсутствуют в представленном контексте. +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Класс \`TraceService\` находится в файле \`src/app\_runtime/tracing/service.py\`. Он наследуется от \`TraceContextFactory\`. Основные компоненты: \- \*\*Конструктор \(\`\_\_init\_\_\`\)\*\*: принимает параметры \`transport\` и \`store\`, инициализирует транспорт для трассировки и хранилище контекста трассировки. Если транспорт или хранилище не указаны, используются реализации по умолчанию: \`NoOpTraceTransport\(\)\` и \`TraceContextStore\(\)\`. \- \*\*Метод \`create\_context\`\*\*: создаёт новый контекст трассировки, принимая параметры \`alias\`, \`parent\_id\`, \`kind\` и \`attrs\`. В нём создаётся запись контекста трассировки с уникальным идентификатором, текущим временем и переданными параметрами, затем эта запись сохраняется в хранилище. Также определены методы \`open\_context\`, \`close\_context\`, \`current\_trace\_id\`, но их реализация не приведена в контексте. Осторожный вывод: \`TraceService\` используется для управл… +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` определена в модуле \`src/plba/bootstrap.py\`. Она создаёт и настраивает экземпляр \`RuntimeManager\`, регистрируя модуль приложения и, при необходимости, конфигурационные файлы и HTTP\-канал управления. Основные действия функции: \- Инициализирует объект \`RuntimeManager\`. \- Если указан путь к конфигурационному файлу \(\`config\_path\`\), добавляет его в менеджер. \- Если включено управление через HTTP \(\`enable\_http\_control\`\), регистрирует HTTP\-канал управления в плоскости контроля. \- Регистрирует модуль приложения в менеджере времени выполнения. \- Возвращает настроенный объект \`RuntimeManager\`. Входные параметры: \- \`module\`: экземпляр \`ApplicationModule\`. \- \`config\_path\`: опциональный путь к конфигурационному файлу. \- \`enable\_http\_control\`: флаг включения HTTP\-контроля. \- \`control\_host\`, \`control\_port\`, \`control\_timeout\`: параметры подключения для HTTP\-… +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс HttpControlChannel в файле http\_channel.py наследует ControlChannel и реализует HTTP\-канал управления. Он имеет конструктор с параметрами хост, порт и таймаут, где инициализирует runner \(используя Uvicorn для запуска сервера\) и factory для создания FastAPI\-приложения. Метод start запускает сервер с приложением, используя фабрику и передавая обработчики здоровья и действий. Методы \_health\_response и \_action\_response отвечают за обработку запросов к здоровью сервиса и выполнение действий соответственно. Структура класса ориентирована на создание отдельного HTTP\-канала для управления приложением через HTTP\-запросы. +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` находятся в файле \`tests/test\_runtime.py\`. Косвенные тесты: \- В файле \`tests/test\_business\_control\_actions.py\` есть тесты, использующие компоненты контроля, которые взаимодействуют с \`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::test\_public\_plba\_package\_exports\_runtime\_builder\_and\_worker\_contract\` \- Проверяет экспорт пакета plba и доступность создания runtime, включая \`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 routes: \- GET /health, объявлен в src/app\_runtime/control/http\_app.py, строки 31\-34, обработчик health \- GET /actions/\{action\}, объявлен в src/app\_runtime/control/http\_app.py, строки 38\-42, обработчик action \- POST /actions/\{action\}, объявлен в src/app\_runtime/control/http\_app.py, строки 38\-42, обработчик action Кандидаты на входы не требуются, так как все маршруты уже подтверждены. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Подтверждённая точка входа для health endpoint: GET /health, declared in src/app\_runtime/control/http\_app.py, lines 31\-34, handler function named 'health'. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске \`RuntimeManager\` выполняются следующие шаги: 1. Инициализация конфигурации и сервисов: \- В конструкторе \`RuntimeManager.\_\_init\_\_\` инициализируется конфигурация через поле \`configuration\`, загружаются файлы конфигурации с помощью метода \`add\_config\_file\`. \- Создаются сервисы внутри конструктора, вызывая сам конструктор \(\`\_\_init\_\_\`\) и регистрируя основные сервисы методом \`\_register\_core\_services\`. 2. Начальная инициализация состояния: \- Внутри конструктора происходит начальное чтение и запись атрибутов состояния, необходимых для работы менеджера. 3. Запуск менеджера: \- После полной инициализации выполняется метод \`start\`, который приводит \`RuntimeManager\` в активное состояние и начинает обработку запросов. Поток данных включает в себя загрузку конфигурации, создание и регистрацию сервисов, а также переход в рабочее состояние. Дальнейшее восстановление поток… +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Запрос /health обрабатывается следующим образом: 1. В файле \`http\_app.py\` класс \`HttpControlAppFactory\` создаёт объект FastAPI с маршрутом \`/health\`. 2. Маршрут \`/health\` сопоставлен с функцией\-обработчиком \`health\`, определённой внутри фабрики на строках 31–34. 3. При обращении к маршруту \`/health\` вызывается этот обработчик, который асинхронно вызывает провайдер здоровья \(\`health\_provider\`\), переданный в фабрику. 4. Приложение обернуто middleware для логирования времени ответа, которое добавляется в заголовок X\-Response\-Time\-Ms. Цепочка вызовов завершается на уровне фабрики, конкретных имплементаций провайдера здоровья в данном контексте нет. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > Компоненты, участвующие в RuntimeManager: 1. \*\*ControlPlaneService\*\* \- Регистрирует каналы управления \(\_register\_channel\_\), запускается асинхронно \(\_start\_async\), останавливается \(\_stop\_, \_stop\_async\_\). \- Файлы: \`service.py\` \(строки 14–52\). 2. \*\*HttpControlAppFactory\*\* \- Фабрика для создания HTTP\-приложений контроля. \- Файл: \`http\_app.py\` \(строки 15–53\). 3. \*\*UvicornThreadRunner\*\* \- Выполняет работу в потоке Uvicorn. \- Файл: \`http\_runner.py\` \(строки 10–61\). 4. \*\*HttpControlChannel\*\* \- Канал HTTP\-контроля. \- Файл: \`http\_channel.py\` \(строки 12–57\). 5. \*\*WorkflowPersistence\*\* \- Сохраняет состояние рабочих процессов. \- Файл: \`workflow\_persistence.py\` \(строки 8–54\). 6. \*\*InMemoryTaskQueue\*\* \- Очередь задач в памяти. \- Файл: \`in\_memory.py\` \(строки 9–38\). 7. \*\*ConfigFileLoader\*\* \- Загружает конфигурационные файлы. \- Файл: \`file\_loader.py\` \(строки 11–48\). 8. \*\*TraceContextSt… +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > Компоненты, участвующие в ControlPlaneService: \- \*\*ControlActionSet\*\* – модель для управления действиями. \- \*\*ControlChannel\*\* – абстрактный базовый класс каналов контроля с методами start и stop. \- \*\*UvicornThreadRunner\*\* – этап пайплайна для многопоточного запуска HTTP сервера. \- \*\*HttpControlChannel\*\* – канал HTTP\-контроля, этап пайплайна. \- \*\*HttpControlAppFactory\*\* – фабрика создания HTTP\-приложения контроля. \- \*\*WorkflowPersistence\*\* – сохранение состояний рабочих процессов. \- \*\*InMemoryTaskQueue\*\* – очередь задач в памяти. \- \*\*ConfigFileLoader\*\* – загрузчик конфигурационных файлов. \- \*\*TraceContextStore\*\* – хранилище контекстов трассировки. \- \*\*WorkerSupervisor\*\* – надзор за рабочими процессами. \- \*\*WorkflowEngine\*\* – движок обработки рабочих процессов. Связи внутри ControlPlaneService: \- \_channels – атрибут, используемый во многих методах сервиса. \- register\_… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Сущность 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_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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json similarity index 90% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json index 246a76b..c82b8f8 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Какие компоненты участвуют в ControlPlaneService?", @@ -10,7 +10,7 @@ "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. Они активно участвуют в его работе и обеспечивают функциональность и инфраструктуру, необходимую для выполнения его обязанностей.", + "llm_answer": "**ControlPlaneService** является главным компонентом, управляющим жизненным циклом контролируемых каналов.\n\nКомпоненты:\n- **ControlPlaneService**\n- **ControlPlaneService.__init__**: инициализирует сервис, регистрирует каналы и запускает асинхронные операции.\n- **ControlPlaneService.start**: начинает работу сервиса, вызывая asyncio.run и читая атрибут _channels.\n- **ControlPlaneService.register_channel**: регистрирует канал, читая атрибут _channels.\n- **ControlPlaneService.stop**, **ControlPlaneService._stop_async**: останавливают сервисы.\n- **ControlPlaneService._start_async**: отвечает за асинхронный старт.\n- **ControlChannel**: абстрактный базовый класс всех каналов контроля с методами start и stop.\n\nСвязи между компонентами:\n- Инициализация (ControlPlaneService.__init__) выполняет dataflow_slice для методов регистрации и старта.\n- Метод старта (ControlPlaneService.start) вызывает asyncio.run и зависит от атрибута _channels.\n- Регистрация канала (ControlPlaneService.register_channel) использует данные из атрибута _channels.\n\nТаким образом, ControlPlaneService координирует работу зарегистрированных каналов (_channels), обеспечивая их правильный запуск и остановку.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -120,12 +120,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "ControlPlaneService", "alternatives": [ + "ControlPlaneService", + "ControlPlaneService", + "ControlPlaneService", + "ControlPlaneService", "ControlPlaneService" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1258,6 +1262,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1298,6 +1307,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1338,6 +1352,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1378,6 +1397,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1418,6 +1442,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1458,6 +1487,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 22, + "end_line": 22, + "edge_type": "calls", + "source": "ControlPlaneService.start", + "target": "asyncio.run", "metadata": { "edge_id": "4e0b3147fb867d48d26567570c259f4052a739e3098133802d4b8bafcf03be6b", "edge_type": "calls", @@ -1482,6 +1516,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 17, + "end_line": 17, + "edge_type": "reads_attr", + "source": "ControlPlaneService.register_channel", + "target": "ControlPlaneService._channels", "metadata": { "edge_id": "3101fdc99a7a9c5aebf18a024bc148d37b348248a6fd02b95724dff280f2908a", "edge_type": "reads_attr", @@ -1506,6 +1545,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 20, + "end_line": 20, + "edge_type": "reads_attr", + "source": "ControlPlaneService.start", + "target": "ControlPlaneService._channels", "metadata": { "edge_id": "9452e50ef27d47c30ee1c311c48fe73ecddbf7a6dbcf967a6345e98222d9f71a", "edge_type": "reads_attr", @@ -1529,37 +1573,115 @@ "content": "ControlPlaneService.start reads_attr ControlPlaneService._channels" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "symbol": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)" + }, + { + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "symbol": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)" + }, + { + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "symbol": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "symbol": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "symbol": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1587,6 +1709,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1610,6 +1739,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2881,11 +3044,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C4_SEMANTIC_ROLES": 40, + "C4_SEMANTIC_ROLES": 81, "C3_ENTRYPOINTS": 20, "C2_DEPENDENCY_GRAPH": 60, - "C1_SYMBOL_CATALOG": 25, - "C0_SOURCE_CHUNKS": 17 + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 37 } } }, @@ -2901,6 +3064,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2915,7 +3081,7 @@ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2968,8 +3134,44 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "**ControlPlaneService** — центральный компонент, отвечающий за инициализацию, запуск и остановку контролируемых каналов.\n\nОсновные компоненты:\n- **ControlPlaneService**: главный класс сервиса управления каналами контроля.\n- **ControlPlaneService.__init__**: метод инициализации, выполняющий dataflow_", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": true, + "final_answer_preview": "**ControlPlaneService** является главным компонентом, управляющим жизненным циклом контролируемых каналов.\n\nКомпоненты:\n- **ControlPlaneService**\n- **ControlPlaneService.__init__**: инициализирует сервис, регистрирует каналы и запускает асинхронные операции.\n- **ControlPlaneService.start**: начинает" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 233, + "pre_evidence_gate": 1, + "llm": 6272, + "post_evidence_gate": 1, + "repair": 5760, + "post_evidence_gate_recheck": 1 + } }, "rag_rows": [ { @@ -4166,6 +4368,154 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 233 + }, + "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": 81, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 37 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 6272 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "**ControlPlaneService** — центральный компонент, отвечающий за инициализацию, запуск и остановку контролируемых каналов.\n\nОсновные компоненты:\n- **ControlPlaneService**: главный класс сервиса управления каналами контроля.\n- **ControlPlaneService.__init__**: метод инициализации, выполняющий dataflow_", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 1, + "repair": 5760 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "**ControlPlaneService** — центральный компонент, отвечающий за инициализацию, запуск и остановку контролируемых каналов.\n\nОсновные компоненты:\n- **ControlPlaneService**: главный класс сервиса управления каналами контроля.\n- **ControlPlaneService.__init__**: метод инициализации, выполняющий dataflow_", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": true, + "final_answer_preview": "**ControlPlaneService** является главным компонентом, управляющим жизненным циклом контролируемых каналов.\n\nКомпоненты:\n- **ControlPlaneService**\n- **ControlPlaneService.__init__**: инициализирует сервис, регистрирует каналы и запускает асинхронные операции.\n- **ControlPlaneService.start**: начинает" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md new file mode 100644 index 0000000..11a4dff --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-control-plane.md @@ -0,0 +1,307 @@ +# plba-v2-architecture-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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- **ControlPlaneService**\n- **ControlPlaneService.__init__**: инициализирует сервис, регистрирует каналы и запускает асинхронные операции.\n- **ControlPlaneService.start**: начинает работу сервиса, вызывая asyncio.run и читая атрибут _channels.\n- **ControlPlaneService.register_channel**: регистрирует канал, читая атрибут _channels.\n- **ControlPlaneService.stop**, **ControlPlaneService._stop_async**: останавливают сервисы.\n- **ControlPlaneService._start_async**: отвечает за асинхронный старт.\n- **ControlChannel**: абстрактный базовый класс всех каналов контроля с методами start и stop.\n\nСвязи между компонентами:\n- Инициализация (ControlPlaneService.__init__) выполняет dataflow_slice для методов регистрации и старта.\n- Метод старта (ControlPlaneService.start) вызывает asyncio.run и зависит от атрибута _channels.\n- Регистрация канала (ControlPlaneService.register_channel) использует данные из атрибута _channels.\n\nТаким образом, ControlPlaneService координирует работу зарегистрированных каналов (_channels), обеспечивая их правильный запуск и остановку.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 233 + }, + "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": 81, + "C3_ENTRYPOINTS": 20, + "C2_DEPENDENCY_GRAPH": 60, + "C1_SYMBOL_CATALOG": 33, + "C0_SOURCE_CHUNKS": 37 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 6272 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "**ControlPlaneService** — центральный компонент, отвечающий за инициализацию, запуск и остановку контролируемых каналов.\n\nОсновные компоненты:\n- **ControlPlaneService**: главный класс сервиса управления каналами контроля.\n- **ControlPlaneService.__init__**: метод инициализации, выполняющий dataflow_", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 1, + "repair": 5760 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "**ControlPlaneService** — центральный компонент, отвечающий за инициализацию, запуск и остановку контролируемых каналов.\n\nОсновные компоненты:\n- **ControlPlaneService**: главный класс сервиса управления каналами контроля.\n- **ControlPlaneService.__init__**: метод инициализации, выполняющий dataflow_", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": true, + "final_answer_preview": "**ControlPlaneService** является главным компонентом, управляющим жизненным циклом контролируемых каналов.\n\nКомпоненты:\n- **ControlPlaneService**\n- **ControlPlaneService.__init__**: инициализирует сервис, регистрирует каналы и запускает асинхронные операции.\n- **ControlPlaneService.start**: начинает" + } + } +] + +## 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", + "resolved_target": "ControlPlaneService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "ControlPlaneService", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "ControlPlaneService", + "draft_answer_preview": "**ControlPlaneService** — центральный компонент, отвечающий за инициализацию, запуск и остановку контролируемых каналов.\n\nОсновные компоненты:\n- **ControlPlaneService**: главный класс сервиса управления каналами контроля.\n- **ControlPlaneService.__init__**: метод инициализации, выполняющий dataflow_", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": true, + "final_answer_preview": "**ControlPlaneService** является главным компонентом, управляющим жизненным циклом контролируемых каналов.\n\nКомпоненты:\n- **ControlPlaneService**\n- **ControlPlaneService.__init__**: инициализирует сервис, регистрирует каналы и запускает асинхронные операции.\n- **ControlPlaneService.start**: начинает" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 233, + "pre_evidence_gate": 1, + "llm": 6272, + "post_evidence_gate": 1, + "repair": 5760, + "post_evidence_gate_recheck": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json similarity index 92% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json index 04ff995..bd8c89d 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Какие компоненты участвуют в RuntimeManager?", @@ -10,8 +10,8 @@ "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", + "llm_answer": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager.", + "answer_mode": "degraded", "path_scope": [], "symbol_candidates": [ "RuntimeManager" @@ -120,12 +120,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1306,6 +1310,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1346,6 +1355,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 59, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.start", "metadata": { "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", "edge_type": "dataflow_slice", @@ -1386,6 +1400,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1426,6 +1445,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1466,6 +1490,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1506,6 +1535,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1546,6 +1580,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1586,6 +1625,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 127, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager._register_core_services", "metadata": { "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", "edge_type": "dataflow_slice", @@ -1625,37 +1669,115 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager._register_core_services" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/core/runtime.py", + "title": "RuntimeManager", + "symbol": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "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)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "symbol": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)" + }, + { + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "symbol": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)" + }, + { + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "symbol": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "symbol": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1683,6 +1805,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1706,6 +1835,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3025,11 +3188,11 @@ "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 + "C4_SEMANTIC_ROLES": 41, + "C3_ENTRYPOINTS": 25, + "C2_DEPENDENCY_GRAPH": 70, + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 22 } } }, @@ -3044,7 +3207,10 @@ "C0_SOURCE_CHUNKS" ], "retrieval_sufficient": true, - "answer_mode": "normal", + "answer_mode": "degraded", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3059,7 +3225,7 @@ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -3112,8 +3278,47 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** — инициализирует конфигурацию и запускает основные сервисы (методы: `__init__`, `start`, `add_config_file`, `_register_core_services`).\n- **ControlPlaneService** — управляет каналами контроля и асинхронными операциями старта ", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_relations", + "too_vague_for_architecture" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 191, + "pre_evidence_gate": 1, + "llm": 6733, + "post_evidence_gate": 1, + "repair": 4344, + "post_evidence_gate_recheck": 1 + } }, "rag_rows": [ { @@ -4355,9 +4560,163 @@ } ], "validation": { - "passed": true, - "action": "return", - "reasons": [] - } + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_relations", + "too_vague_for_architecture" + ] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "ARCHITECTURE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 191 + }, + "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": 41, + "C3_ENTRYPOINTS": 25, + "C2_DEPENDENCY_GRAPH": 70, + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 22 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 6733 + }, + "output": { + "prompt_name": "code_qa_architecture_answer", + "answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** — инициализирует конфигурацию и запускает основные сервисы (методы: `__init__`, `start`, `add_config_file`, `_register_core_services`).\n- **ControlPlaneService** — управляет каналами контроля и асинхронными операциями старта ", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 1, + "repair": 4344 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** — инициализирует конфигурацию и запускает основные сервисы (методы: `__init__`, `start`, `add_config_file`, `_register_core_services`).\n- **ControlPlaneService** — управляет каналами контроля и асинхронными операциями старта ", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_relations", + "too_vague_for_architecture" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + } + ] } } \ 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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md similarity index 52% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md index 2f29970..1046850 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-architecture-runtime-manager.md @@ -1,6 +1,6 @@ # 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml - runner: agent_runtime - mode: full_chain - passed: True @@ -15,8 +15,8 @@ "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", + "llm_answer": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager.", + "answer_mode": "degraded", "path_scope": [], "symbol_candidates": [ "RuntimeManager" @@ -36,7 +36,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -49,7 +49,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 155 + "retrieval": 191 }, "output": { "rag_count": 33, @@ -108,11 +108,11 @@ "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 + "C4_SEMANTIC_ROLES": 41, + "C3_ENTRYPOINTS": 25, + "C2_DEPENDENCY_GRAPH": 70, + "C1_SYMBOL_CATALOG": 30, + "C0_SOURCE_CHUNKS": 22 } } }, @@ -120,36 +120,65 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 33 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 2995 + "llm": 6733 }, "output": { "prompt_name": "code_qa_architecture_answer", - "answer_preview": "В подсистеме RuntimeManager участвуют следующие компоненты:\n\n1. **RuntimeManager** — главный менеджер runtime, отвечает за конфигурацию и запуск runtime-потоков (src/app_runtime/core/runtime.py).\n2. **ControlPlaneService** — сервис управления каналами контроля, обеспечивает регистрацию каналов и ста" + "answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** — инициализирует конфигурацию и запускает основные сервисы (методы: `__init__`, `start`, `add_config_file`, `_register_core_services`).\n- **ControlPlaneService** — управляет каналами контроля и асинхронными операциями старта ", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", - "status": "passed", + "status": "failed", "timings_ms": { - "post_evidence_gate": 0, - "repair": 0 + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 1, + "repair": 4344 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** — инициализирует конфигурацию и запускает основные сервисы (методы: `__init__`, `start`, `add_config_file`, `_register_core_services`).\n- **ControlPlaneService** — управляет каналами контроля и асинхронными операциями старта ", + "repair_candidate": true }, "output": { - "passed": true, - "reasons": [], - "repair_used": false + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_relations", + "too_vague_for_architecture" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." } } ] @@ -166,7 +195,10 @@ "C0_SOURCE_CHUNKS" ], "retrieval_sufficient": true, - "answer_mode": "normal", + "answer_mode": "degraded", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -234,12 +266,46 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "ARCHITECTURE", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 8, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Компоненты, участвующие в подсистеме RuntimeManager:\n\n- **RuntimeManager** — инициализирует конфигурацию и запускает основные сервисы (методы: `__init__`, `start`, `add_config_file`, `_register_core_services`).\n- **ControlPlaneService** — управляет каналами контроля и асинхронными операциями старта ", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_relations", + "too_vague_for_architecture" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 155, - "pre_evidence_gate": 0, - "llm": 2995 + "router": 1, + "retrieval": 191, + "pre_evidence_gate": 1, + "llm": 6733, + "post_evidence_gate": 1, + "repair": 4344, + "post_evidence_gate_recheck": 1 } } 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json similarity index 91% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json index e334c5c..befe75f 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Что делает функция create_runtime?", @@ -10,7 +10,7 @@ "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Этот процесс позволяет настроить и запустить приложение с учетом заданных конфигураций и режимов управления.", + "llm_answer": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если передан путь к конфигурационному файлу, вызывает `runtime.add_config_file(config_path)` для добавления конфигурации.\n- Если включён HTTP-контроль, регистрирует HTTP-канал управления через `runtime.control_plane.register_channel(HttpControlChannel(host=control_host, port=control_port, timeout=control_timeout))`.\n- Регистрирует модуль приложения методом `runtime.register_module(module)`.\n\nВозвращает сконфигурированный объект типа `RuntimeManager`.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -132,12 +132,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "create_runtime", "alternatives": [ - "create_runtime" + "create_runtime", + "create_runtime", + "annotations", + "json", + "Path" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1190,6 +1194,11 @@ "relations": [ { "path": "src/plba/bootstrap.py", + "start_line": 19, + "end_line": 19, + "edge_type": "calls", + "source": "create_runtime", + "target": "runtime.add_config_file", "metadata": { "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", "edge_type": "calls", @@ -1214,6 +1223,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 28, + "end_line": 28, + "edge_type": "reads_attr", + "source": "create_runtime", + "target": "runtime.register_module", "metadata": { "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", "edge_type": "reads_attr", @@ -1238,6 +1252,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 17, + "end_line": 17, + "edge_type": "instantiates", + "source": "create_runtime", + "target": "RuntimeManager", "metadata": { "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", "edge_type": "instantiates", @@ -1262,6 +1281,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 28, + "end_line": 28, + "edge_type": "calls", + "source": "create_runtime", + "target": "runtime.register_module", "metadata": { "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", "edge_type": "calls", @@ -1286,6 +1310,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 21, + "end_line": 27, + "edge_type": "calls", + "source": "create_runtime", + "target": "runtime.control_plane.register_channel", "metadata": { "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", "edge_type": "calls", @@ -1310,6 +1339,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 19, + "end_line": 19, + "edge_type": "reads_attr", + "source": "create_runtime", + "target": "runtime.add_config_file", "metadata": { "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", "edge_type": "reads_attr", @@ -1333,37 +1367,83 @@ "content": "create_runtime reads_attr runtime.add_config_file" } ], + "semantic_hints": [ + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "symbol": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)" + }, + { + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "symbol": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)" + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "symbol": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/workflow/engine/workflow_engine.py", + "title": "WorkflowEngine", + "symbol": "WorkflowEngine", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkflowEngine\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "symbol": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + } + ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1391,6 +1471,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1414,6 +1501,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2587,10 +2708,10 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 46, + "C1_SYMBOL_CATALOG": 43, "C0_SOURCE_CHUNKS": 20, - "C4_SEMANTIC_ROLES": 17, - "C2_DEPENDENCY_GRAPH": 69, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, "C3_ENTRYPOINTS": 13 } } @@ -2607,6 +2728,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2621,7 +2745,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2674,8 +2798,42 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 144, + "pre_evidence_gate": 1, + "llm": 4185, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -3774,6 +3932,154 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "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": 144 + }, + "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": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4185 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md new file mode 100644 index 0000000..e4c0102 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-create-runtime.md @@ -0,0 +1,305 @@ +# plba-v2-explain-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если передан путь к конфигурационному файлу, вызывает `runtime.add_config_file(config_path)` для добавления конфигурации.\n- Если включён HTTP-контроль, регистрирует HTTP-канал управления через `runtime.control_plane.register_channel(HttpControlChannel(host=control_host, port=control_port, timeout=control_timeout))`.\n- Регистрирует модуль приложения методом `runtime.register_module(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" + ] +} + +## 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": 144 + }, + "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": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 47, + "C3_ENTRYPOINTS": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4185 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда" + } + } +] + +## 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", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Функция `create_runtime` определена в файле `src/plba/bootstrap.py`. Она создаёт и конфигурирует экземпляр `RuntimeManager`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP-канал управления.\n\nОсновные действия функции:\n- Создаёт экземпляр `RuntimeManager`.\n- Если переда" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 144, + "pre_evidence_gate": 1, + "llm": 4185, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json similarity index 89% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json index 6a5c7ed..493bbf0 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 устроен так?", @@ -10,7 +10,7 @@ "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-интерфейсы.", + "llm_answer": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фабрики и передавая коллбэки здоровья и действий. \nМетоды _health_response и _action_response (не полностью показаны) вероятно отвечают за обработчики API-эндпоинтов здоровья и выполнения действий. \nОстальные детали, такие как полный контекст методов или их реализации, отсутствуют в данном фрагменте.", "answer_mode": "answered", "path_scope": [ "src/app_runtime/control/http_channel.py" @@ -151,12 +151,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "HttpControlChannel", "alternatives": [ - "HttpControlChannel" + "ControlChannel", + "ControlActionSet", + "JSONResponse", + "HttpControlAppFactory", + "UvicornThreadRunner" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -738,6 +742,11 @@ "relations": [ { "path": "src/app_runtime/control/http_channel.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel._action_response", "metadata": { "edge_id": "c3ef21fcae96c82c00be74b3ab827d4af2085d89cb3fa5521c19a174aad84dbb", "edge_type": "dataflow_slice", @@ -778,6 +787,11 @@ }, { "path": "src/app_runtime/control/http_channel.py", + "start_line": 15, + "end_line": 22, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel.start", "metadata": { "edge_id": "51d73913df709152258ed1b9a8c8f4eb3c575eccfe6b982aef0b28e0789a29da", "edge_type": "dataflow_slice", @@ -818,6 +832,11 @@ }, { "path": "src/app_runtime/control/http_channel.py", + "start_line": 14, + "end_line": 34, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel._health_response", "metadata": { "edge_id": "f858f5c9e575f6c4cdfe3853571b7ee21d1f628a443541d2037c3dc9d0790bef", "edge_type": "dataflow_slice", @@ -858,6 +877,11 @@ }, { "path": "src/app_runtime/control/http_channel.py", + "start_line": 15, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "HttpControlChannel.__init__", + "target": "HttpControlChannel.stop", "metadata": { "edge_id": "0f827ef81a990258a8a74381c8564a8361afa6712dba3200592659c939adcb9d", "edge_type": "dataflow_slice", @@ -897,6 +921,7 @@ "content": "HttpControlChannel.__init__\n -> HttpControlChannel._runner\n -> HttpControlChannel.stop" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -1454,8 +1479,8 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 20, - "C0_SOURCE_CHUNKS": 16, + "C1_SYMBOL_CATALOG": 40, + "C0_SOURCE_CHUNKS": 17, "C2_DEPENDENCY_GRAPH": 18 } } @@ -1470,6 +1495,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -1484,7 +1512,7 @@ "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -1525,8 +1553,44 @@ "failure_reasons": [], "evidence_count": 13 }, + "evidence_gate_input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 75, + "pre_evidence_gate": 1, + "llm": 3936, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -2028,6 +2092,146 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 75 + }, + "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": 40, + "C0_SOURCE_CHUNKS": 17, + "C2_DEPENDENCY_GRAPH": 18 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 13 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3936 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md new file mode 100644 index 0000000..56a2960 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-local-http-channel.md @@ -0,0 +1,285 @@ +# plba-v2-explain-local-http-channel + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фабрики и передавая коллбэки здоровья и действий. \nМетоды _health_response и _action_response (не полностью показаны) вероятно отвечают за обработчики API-эндпоинтов здоровья и выполнения действий. \nОстальные детали, такие как полный контекст методов или их реализации, отсутствуют в данном фрагменте.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN_LOCAL", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 75 + }, + "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": 40, + "C0_SOURCE_CHUNKS": 17, + "C2_DEPENDENCY_GRAPH": 18 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 13 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3936 + }, + "output": { + "prompt_name": "code_qa_explain_local_answer", + "answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C2_DEPENDENCY_GRAPH" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "HttpControlChannel", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "HttpControlChannel", + "sub_intent": "EXPLAIN_LOCAL", + "target_type": "symbol", + "evidence_count": 13, + "code_chunk_count": 13, + "entrypoint_count": 0, + "relation_count": 4, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [ + "src/app_runtime/control/http_channel.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlChannel", + "draft_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Класс HttpControlChannel наследует ControlChannel и управляет HTTP-каналом контроля. \nИнициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI-приложения. \nМетод start запускает сервер с приложением, используя фа" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 75, + "pre_evidence_gate": 1, + "llm": 3936, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json similarity index 84% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json index 3b7279e..e802c17 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Объясни класс RuntimeFactoryManager", @@ -10,8 +10,8 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 0, - "llm_answer": "Сущность не удалось однозначно разрешить. Близкие варианты: ControlChannel, ControlChannel.stop, ControlActionSet.", - "answer_mode": "degraded", + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде.", + "answer_mode": "not_found", "path_scope": [], "symbol_candidates": [ "RuntimeFactoryManager" @@ -24,10 +24,8 @@ "C3_ENTRYPOINTS" ] }, - "passed": false, - "mismatches": [ - "llm: expected answer to contain 'не найдена'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Объясни класс RuntimeFactoryManager", "router_result": { @@ -133,16 +131,10 @@ } }, "symbol_resolution": { - "status": "ambiguous", + "status": "not_found", "resolved_symbol": null, - "alternatives": [ - "ControlChannel", - "ControlChannel.stop", - "ControlActionSet", - "ControlChannel", - "ControlPlaneService" - ], - "confidence": 0.55 + "alternatives": [], + "confidence": 0.0 }, "evidence_policy": { "require_def": true, @@ -269,10 +261,11 @@ "retrieval_result": { "target_symbol_candidates": [], "resolved_symbol": null, - "symbol_resolution_status": "ambiguous", + "symbol_resolution_status": "not_found", "file_candidates": [], "code_chunks": [], "relations": [], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -359,11 +352,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 39, - "C0_SOURCE_CHUNKS": 20, - "C4_SEMANTIC_ROLES": 16, + "C1_SYMBOL_CATALOG": 75, + "C0_SOURCE_CHUNKS": 28, + "C4_SEMANTIC_ROLES": 23, "C2_DEPENDENCY_GRAPH": 55, - "C3_ENTRYPOINTS": 12 + "C3_ENTRYPOINTS": 18 } } }, @@ -379,6 +372,9 @@ ], "retrieval_sufficient": false, "answer_mode": "insufficient", + "resolved_target": null, + "answer_policy_branch": "explain_not_found", + "decision_reason": "symbol_resolution_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -393,7 +389,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "ambiguous" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -454,29 +450,50 @@ ], "evidence_count": 0 }, + "evidence_gate_input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "insufficient_evidence" ], "timings_ms": { - "router": 1, - "retrieval": 143, - "pre_evidence_gate": 0 + "router": 2, + "retrieval": 201, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } }, "rag_rows": [], "validation": { - "passed": false, - "action": "repair", - "reasons": [ - "degraded_answer_missing_guardrail" - ] + "passed": true, + "action": "return", + "reasons": [] }, "steps": [ { "step": "router", "status": "completed", "timings_ms": { - "router": 1 + "router": 2 }, "output": { "intent": "CODE_QA", @@ -489,12 +506,12 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 143 + "retrieval": 201 }, "output": { "rag_count": 33, "answer_path_rag_count": 0, - "resolved_symbol_status": "ambiguous", + "resolved_symbol_status": "not_found", "resolved_symbol": null, "requested_layers": [ "C1_SYMBOL_CATALOG", @@ -548,11 +565,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 39, - "C0_SOURCE_CHUNKS": 20, - "C4_SEMANTIC_ROLES": 16, + "C1_SYMBOL_CATALOG": 75, + "C0_SOURCE_CHUNKS": 28, + "C4_SEMANTIC_ROLES": 23, "C2_DEPENDENCY_GRAPH": 55, - "C3_ENTRYPOINTS": 12 + "C3_ENTRYPOINTS": 18 } } }, @@ -560,27 +577,53 @@ "step": "pre_evidence_gate", "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] }, "output": { "passed": false, "failure_reasons": [ "insufficient_evidence" ], - "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met)." + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met).", + "evidence_count": 0 } }, { "step": "llm", "status": "skipped", + "timings_ms": { + "llm": 1 + }, "output": { "reason": "policy_short_circuit", - "answer_mode": "degraded" + "answer_mode": "not_found", + "decision_reason": "symbol_resolution_not_found", + "answer_policy_branch": "explain_not_found" } }, { "step": "post_evidence_gate", "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, "output": { "reason": "no_draft_answer" } 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md similarity index 70% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md index ada6837..1784a91 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-nonexistent-symbol.md @@ -1,9 +1,9 @@ # 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml - runner: agent_runtime - mode: full_chain -- passed: False +- passed: True ## Query Объясни класс RuntimeFactoryManager @@ -15,8 +15,8 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 0, - "llm_answer": "Сущность не удалось однозначно разрешить. Близкие варианты: ControlChannel, ControlChannel.stop, ControlActionSet.", - "answer_mode": "degraded", + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде.", + "answer_mode": "not_found", "path_scope": [], "symbol_candidates": [ "RuntimeFactoryManager" @@ -36,7 +36,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 1 + "router": 2 }, "output": { "intent": "CODE_QA", @@ -49,12 +49,12 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 143 + "retrieval": 201 }, "output": { "rag_count": 33, "answer_path_rag_count": 0, - "resolved_symbol_status": "ambiguous", + "resolved_symbol_status": "not_found", "resolved_symbol": null, "requested_layers": [ "C1_SYMBOL_CATALOG", @@ -108,11 +108,11 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 39, - "C0_SOURCE_CHUNKS": 20, - "C4_SEMANTIC_ROLES": 16, + "C1_SYMBOL_CATALOG": 75, + "C0_SOURCE_CHUNKS": 28, + "C4_SEMANTIC_ROLES": 23, "C2_DEPENDENCY_GRAPH": 55, - "C3_ENTRYPOINTS": 12 + "C3_ENTRYPOINTS": 18 } } }, @@ -120,27 +120,53 @@ "step": "pre_evidence_gate", "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] }, "output": { "passed": false, "failure_reasons": [ "insufficient_evidence" ], - "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met)." + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met).", + "evidence_count": 0 } }, { "step": "llm", "status": "skipped", + "timings_ms": { + "llm": 1 + }, "output": { "reason": "policy_short_circuit", - "answer_mode": "degraded" + "answer_mode": "not_found", + "decision_reason": "symbol_resolution_not_found", + "answer_policy_branch": "explain_not_found" } }, { "step": "post_evidence_gate", "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, "output": { "reason": "no_draft_answer" } @@ -160,6 +186,9 @@ ], "retrieval_sufficient": false, "answer_mode": "insufficient", + "resolved_target": null, + "answer_policy_branch": "explain_not_found", + "decision_reason": "symbol_resolution_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -174,7 +203,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "ambiguous" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -235,15 +264,38 @@ ], "evidence_count": 0 }, + "evidence_gate_input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "insufficient_evidence" ], "timings_ms": { - "router": 1, - "retrieval": 143, - "pre_evidence_gate": 0 + "router": 2, + "retrieval": 201, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } } ## Mismatches -- llm: expected answer to contain 'не найдена' \ No newline at end of file +- 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-runtime-manager.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json index 9d308c8..c12970a 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Объясни как работает класс RuntimeManager", @@ -10,8 +10,8 @@ "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", + "llm_answer": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager.", + "answer_mode": "degraded", "path_scope": [], "symbol_candidates": [ "RuntimeManager" @@ -131,12 +131,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1277,6 +1281,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1317,6 +1326,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1357,6 +1371,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1397,6 +1416,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1437,6 +1461,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1477,6 +1506,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1516,37 +1550,83 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/core/runtime.py", + "title": "RuntimeManager", + "symbol": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "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)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1574,6 +1654,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1597,6 +1684,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2866,11 +2987,11 @@ "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 + "C1_SYMBOL_CATALOG": 64, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 14 } } }, @@ -2885,7 +3006,10 @@ "C3_ENTRYPOINTS" ], "retrieval_sufficient": true, - "answer_mode": "normal", + "answer_mode": "degraded", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2900,7 +3024,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2953,8 +3077,48 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он играет роль стадии конвейера (pipeline stage), согласно семантическим подсказкам.\n\nОднако в предоставленном контексте отсутствуют конкретные методы, поля или вызовы этого класса. Если необходимы подробности работы `Runtim", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods", + "missing_concrete_calls", + "too_vague_for_explain" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 176, + "pre_evidence_gate": 1, + "llm": 3521, + "post_evidence_gate": 2, + "repair": 2383, + "post_evidence_gate_recheck": 2 + } }, "rag_rows": [ { @@ -4146,9 +4310,165 @@ } ], "validation": { - "passed": true, - "action": "return", - "reasons": [] - } + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods", + "missing_concrete_calls", + "too_vague_for_explain" + ] + }, + "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": 176 + }, + "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": 64, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3521 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он играет роль стадии конвейера (pipeline stage), согласно семантическим подсказкам.\n\nОднако в предоставленном контексте отсутствуют конкретные методы, поля или вызовы этого класса. Если необходимы подробности работы `Runtim", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 2, + "post_evidence_gate_recheck": 2, + "repair": 2383 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он играет роль стадии конвейера (pipeline stage), согласно семантическим подсказкам.\n\nОднако в предоставленном контексте отсутствуют конкретные методы, поля или вызовы этого класса. Если необходимы подробности работы `Runtim", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods", + "missing_concrete_calls", + "too_vague_for_explain" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md new file mode 100644 index 0000000..11eea7b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-runtime-manager.md @@ -0,0 +1,315 @@ +# plba-v2-explain-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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.", + "answer_mode": "degraded", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 176 + }, + "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": 64, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 57, + "C3_ENTRYPOINTS": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3521 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он играет роль стадии конвейера (pipeline stage), согласно семантическим подсказкам.\n\nОднако в предоставленном контексте отсутствуют конкретные методы, поля или вызовы этого класса. Если необходимы подробности работы `Runtim", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 2, + "post_evidence_gate_recheck": 2, + "repair": 2383 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он играет роль стадии конвейера (pipeline stage), согласно семантическим подсказкам.\n\nОднако в предоставленном контексте отсутствуют конкретные методы, поля или вызовы этого класса. Если необходимы подробности работы `Runtim", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods", + "missing_concrete_calls", + "too_vague_for_explain" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + } +] + +## 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": "degraded", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Класс `RuntimeManager` определён в файле `src/app_runtime/core/runtime.py`. Он играет роль стадии конвейера (pipeline stage), согласно семантическим подсказкам.\n\nОднако в предоставленном контексте отсутствуют конкретные методы, поля или вызовы этого класса. Если необходимы подробности работы `Runtim", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods", + "missing_concrete_calls", + "too_vague_for_explain" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 176, + "pre_evidence_gate": 1, + "llm": 3521, + "post_evidence_gate": 2, + "repair": 2383, + "post_evidence_gate_recheck": 2 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json index e7d893b..9762165 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Объясни как работает класс TraceService", @@ -10,8 +10,8 @@ "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", + "llm_answer": "Недостаточно подтверждённых данных для уверенного ответа по TraceService.", + "answer_mode": "degraded", "path_scope": [], "symbol_candidates": [ "TraceService" @@ -131,12 +131,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "TraceService", "alternatives": [ + "TraceService", + "TraceService", + "TraceService", + "TraceService", "TraceService" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1280,6 +1284,11 @@ "relations": [ { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 61, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.create_context", "metadata": { "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", "edge_type": "dataflow_slice", @@ -1320,6 +1329,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 84, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.close_context", "metadata": { "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", "edge_type": "dataflow_slice", @@ -1360,6 +1374,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 78, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.open_context", "metadata": { "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", "edge_type": "dataflow_slice", @@ -1400,6 +1419,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 41, + "end_line": 43, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.__init__", "metadata": { "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", "edge_type": "dataflow_slice", @@ -1440,6 +1464,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 81, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.current_trace_id", "metadata": { "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", "edge_type": "dataflow_slice", @@ -1480,6 +1509,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 88, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.step", "metadata": { "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", "edge_type": "dataflow_slice", @@ -1519,37 +1553,83 @@ "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" } ], + "semantic_hints": [ + { + "path": "src/app_runtime/tracing/service.py", + "title": "TraceService", + "symbol": "TraceService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "TraceService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (13)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" + }, + { + "path": "src/app_runtime/queue/in_memory.py", + "title": "InMemoryTaskQueue", + "symbol": "InMemoryTaskQueue", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "InMemoryTaskQueue\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (9)" + }, + { + "path": "src/app_runtime/config/file_loader.py", + "title": "ConfigFileLoader", + "symbol": "ConfigFileLoader", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "ConfigFileLoader\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (8)" + }, + { + "path": "src/app_runtime/tracing/store.py", + "title": "TraceContextStore", + "symbol": "TraceContextStore", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "TraceContextStore\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + }, + { + "path": "src/app_runtime/workers/supervisor.py", + "title": "WorkerSupervisor", + "symbol": "WorkerSupervisor", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "WorkerSupervisor\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (6)" + } + ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1577,6 +1657,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1600,6 +1687,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "", + "handler_symbol": "", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -2869,11 +2990,11 @@ "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 + "C1_SYMBOL_CATALOG": 49, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 15 } } }, @@ -2888,7 +3009,10 @@ "C3_ENTRYPOINTS" ], "retrieval_sufficient": true, - "answer_mode": "normal", + "answer_mode": "degraded", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2903,7 +3027,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2956,8 +3080,46 @@ "failure_reasons": [], "evidence_count": 33 }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory` и используется для управления трассировкой приложений.\n\nОсновные компоненты:\n- **Конструктор**: принимает опциональные аргументы `transport` и `store`. Если они не указаны, используются", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по TraceService." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 158, + "pre_evidence_gate": 1, + "llm": 4974, + "post_evidence_gate": 3, + "repair": 4719, + "post_evidence_gate_recheck": 2 + } }, "rag_rows": [ { @@ -4149,9 +4311,161 @@ } ], "validation": { - "passed": true, - "action": "return", - "reasons": [] - } + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ] + }, + "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": 158 + }, + "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": 49, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 15 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4974 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory` и используется для управления трассировкой приложений.\n\nОсновные компоненты:\n- **Конструктор**: принимает опциональные аргументы `transport` и `store`. Если они не указаны, используются", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 3, + "post_evidence_gate_recheck": 2, + "repair": 4719 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory` и используется для управления трассировкой приложений.\n\nОсновные компоненты:\n- **Конструктор**: принимает опциональные аргументы `transport` и `store`. Если они не указаны, используются", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по TraceService." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md new file mode 100644 index 0000000..c5d90a9 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-explain-trace-service.md @@ -0,0 +1,311 @@ +# plba-v2-explain-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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.", + "answer_mode": "degraded", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "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": "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": 49, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 21, + "C2_DEPENDENCY_GRAPH": 49, + "C3_ENTRYPOINTS": 15 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 33 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4974 + }, + "output": { + "prompt_name": "code_qa_explain_answer", + "answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory` и используется для управления трассировкой приложений.\n\nОсновные компоненты:\n- **Конструктор**: принимает опциональные аргументы `transport` и `store`. Если они не указаны, используются", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "failed", + "timings_ms": { + "post_evidence_gate": 3, + "post_evidence_gate_recheck": 2, + "repair": 4719 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory` и используется для управления трассировкой приложений.\n\nОсновные компоненты:\n- **Конструктор**: принимает опциональные аргументы `transport` и `store`. Если они не указаны, используются", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по TraceService." + } + } +] + +## 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": "degraded", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "EXPLAIN", + "target_type": "symbol", + "evidence_count": 33, + "code_chunk_count": 33, + "entrypoint_count": 3, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_answer_preview": "Класс `TraceService` находится в файле `src/app_runtime/tracing/service.py`. Он наследует от `TraceContextFactory` и используется для управления трассировкой приложений.\n\nОсновные компоненты:\n- **Конструктор**: принимает опциональные аргументы `transport` и `store`. Если они не указаны, используются", + "repair_candidate": true + }, + "output": { + "passed": false, + "action": "repair", + "reasons": [ + "missing_concrete_methods" + ], + "repair_used": true, + "final_answer_preview": "Недостаточно подтверждённых данных для уверенного ответа по TraceService." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 158, + "pre_evidence_gate": 1, + "llm": 4974, + "post_evidence_gate": 3, + "repair": 4719, + "post_evidence_gate_recheck": 2 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json similarity index 90% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json index 3a05ed5..504529c 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Найди точки входа HTTP control plane", @@ -10,7 +10,7 @@ "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.", + "llm_answer": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n\nКандидаты на входные точки отсутствуют.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -519,37 +519,18 @@ } ], "relations": [], + "semantic_hints": [], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -577,6 +558,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -600,6 +588,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -918,18 +940,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -937,9 +961,16 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 16 - } + "C3_ENTRYPOINTS": 14, + "C0_SOURCE_CHUNKS": 11 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, "diagnostics": { @@ -951,6 +982,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -994,12 +1028,41 @@ "failure_reasons": [], "evidence_count": 9 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 29, - "pre_evidence_gate": 0, - "llm": 853 + "router": 1, + "retrieval": 35, + "pre_evidence_gate": 1, + "llm": 3053, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -1305,7 +1368,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -1318,7 +1381,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 29 + "retrieval": 35 }, "output": { "rag_count": 9, @@ -1337,18 +1400,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -1356,45 +1421,78 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 16 - } + "C3_ENTRYPOINTS": 14, + "C0_SOURCE_CHUNKS": 11 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, { "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 9 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 853 + "llm": 3053 }, "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Эти маршруты объ" + "answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md new file mode 100644 index 0000000..25fe93d --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-control-plane.md @@ -0,0 +1,262 @@ +# plba-v2-find-entrypoints-control-plane + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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 routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n\nКандидаты на входные точки отсутствуют.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "HTTP", + "control", + "plane" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 35 + }, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 14, + "C0_SOURCE_CHUNKS": 11 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Найди точки входа HTTP control plane", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 9 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3053 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 9, + "code_chunk_count": 9, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённые HTTP routes:\n\n1. GET /health — обработчик `health`, объявлен в `src/app_runtime/control/http_app.py`:31-34.\n2. GET /actions/{action} — обработчик `action`, объявлен в `src/app_runtime/control/http_app.py`:38-42.\n3. POST /actions/{action} — обработчик `action`, объявлен в `src/app_runt" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 35, + "pre_evidence_gate": 1, + "llm": 3053, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json similarity index 75% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json index 38d9ece..599a802 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где health endpoint?", @@ -9,8 +9,8 @@ "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)", + "rag_count": 10, + "llm_answer": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -22,10 +22,8 @@ "C0_SOURCE_CHUNKS" ] }, - "passed": false, - "mismatches": [ - "llm: expected answer to contain 'GET /health'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Где health endpoint?", "router_result": { @@ -122,12 +120,9 @@ } }, "symbol_resolution": { - "status": "pending", + "status": "not_found", "resolved_symbol": null, - "alternatives": [ - "health", - "endpoint" - ], + "alternatives": [], "confidence": 0.0 }, "evidence_policy": { @@ -491,28 +486,22 @@ "last_modified": null, "staleness_score": null } - } - ], - "relations": [], - "entrypoints": [ + }, { + "layer": "C0_SOURCE_CHUNKS", "path": "src/app_runtime/control/http_app.py", - "title": "app.post", + "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": { - "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", - "entry_type": "http", - "framework": "fastapi", - "route_or_command": "app.post", - "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", "is_test": false, - "lang_payload": { - "methods": [ - "POST" - ] - }, - "artifact_type": null, "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", "repo_id": "plba", + "artifact_type": null, "section": null, "doc_id": null, "doc_version": null, @@ -521,10 +510,21 @@ "last_modified": null, "staleness_score": null } - }, + } + ], + "relations": [], + "semantic_hints": [], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -552,6 +552,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -575,6 +582,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -587,7 +628,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -884,6 +925,36 @@ "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 + } } ], "retrieval_report": { @@ -893,18 +964,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -912,9 +985,16 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 37, - "C0_SOURCE_CHUNKS": 24 - } + "C3_ENTRYPOINTS": 64, + "C0_SOURCE_CHUNKS": 17 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, "diagnostics": { @@ -926,6 +1006,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -937,7 +1020,7 @@ "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -958,7 +1041,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -967,10 +1050,44 @@ "evidence_gate_decision": { "sufficient": true, "failure_reasons": [], - "evidence_count": 9 + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 96, + "pre_evidence_gate": 1, + "llm": 1485, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -1263,12 +1380,175 @@ "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 + } } ], "validation": { "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 96 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 64, + "C0_SOURCE_CHUNKS": 17 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1485 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..bde801c --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,261 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml +- runner: agent_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": 10, + "llm_answer": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 96 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 64, + "C0_SOURCE_CHUNKS": 17 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1485 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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": 7, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Подтверждённая точка входа для health endpoint:\nGET /health, declared in src/app_runtime/control/http_app.py, lines 31-34, handler function named 'health'." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 96, + "pre_evidence_gate": 1, + "llm": 1485, + "post_evidence_gate": 1 + } +} + +## 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-create-runtime.json b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json index 63cdab9..14ed8eb 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для create_runtime?", @@ -10,7 +10,7 @@ "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)", + "llm_answer": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -136,12 +136,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "create_runtime", "alternatives": [ - "create_runtime" + "create_runtime", + "create_runtime", + "FileConfigProvider", + "hashlib", + "json" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -923,6 +927,11 @@ "relations": [ { "path": "src/plba/bootstrap.py", + "start_line": 19, + "end_line": 19, + "edge_type": "calls", + "source": "create_runtime", + "target": "runtime.add_config_file", "metadata": { "edge_id": "4eaeec4ac55a59d5f66fd01c4754955f8fedaf4bc3df13fa769b352c7bfaacbb", "edge_type": "calls", @@ -947,6 +956,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 28, + "end_line": 28, + "edge_type": "reads_attr", + "source": "create_runtime", + "target": "runtime.register_module", "metadata": { "edge_id": "45516c79ff358dbf9b650a081668df0f66d2fe989300f985a1a78be6be166f8f", "edge_type": "reads_attr", @@ -971,6 +985,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 17, + "end_line": 17, + "edge_type": "instantiates", + "source": "create_runtime", + "target": "RuntimeManager", "metadata": { "edge_id": "0adba17984f850ea1608c9e734d2dd5c325cfde3a8133123aa239e44935ad18e", "edge_type": "instantiates", @@ -995,6 +1014,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 28, + "end_line": 28, + "edge_type": "calls", + "source": "create_runtime", + "target": "runtime.register_module", "metadata": { "edge_id": "ab6003c3441addc1ba1b81edeca009165559f652f6b2cf424e5ae61b1f617de8", "edge_type": "calls", @@ -1019,6 +1043,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 21, + "end_line": 27, + "edge_type": "calls", + "source": "create_runtime", + "target": "runtime.control_plane.register_channel", "metadata": { "edge_id": "2678250030b9ce47a3b3b55fac7897ac530367edc8374ac9d5e6ecafb1e483f0", "edge_type": "calls", @@ -1043,6 +1072,11 @@ }, { "path": "src/plba/bootstrap.py", + "start_line": 19, + "end_line": 19, + "edge_type": "reads_attr", + "source": "create_runtime", + "target": "runtime.add_config_file", "metadata": { "edge_id": "30d4e8aae984ab84d523e80d02f1caeda52d547fa3d2aa47be8845931cabbca2", "edge_type": "reads_attr", @@ -1066,6 +1100,7 @@ "content": "create_runtime reads_attr runtime.add_config_file" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [ { @@ -1897,8 +1932,8 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 33, - "C2_DEPENDENCY_GRAPH": 42, + "C1_SYMBOL_CATALOG": 28, + "C2_DEPENDENCY_GRAPH": 34, "C0_SOURCE_CHUNKS": 14 } } @@ -1913,6 +1948,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -1925,7 +1963,7 @@ "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -1964,8 +2002,42 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 77, + "pre_evidence_gate": 1, + "llm": 1934, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -2741,6 +2813,138 @@ "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": 77 + }, + "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": 28, + "C2_DEPENDENCY_GRAPH": 34, + "C0_SOURCE_CHUNKS": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1934 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md new file mode 100644 index 0000000..88c61e4 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-create-runtime.md @@ -0,0 +1,269 @@ +# plba-v2-find-tests-create-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "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": 77 + }, + "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": 28, + "C2_DEPENDENCY_GRAPH": 34, + "C0_SOURCE_CHUNKS": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1934 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "create_runtime", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "create_runtime", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 1, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "create_runtime", + "draft_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `create_runtime` не найдены.\n\nБлижайший косвенный тест:\n- `tests/test_runtime.py::test_public_plba_package_exports_runtime_builder_and_worker_contract`\n - Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 77, + "pre_evidence_gate": 1, + "llm": 1934, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json similarity index 94% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json index 546bf32..2ba332b 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для RuntimeManager?", @@ -10,7 +10,7 @@ "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`, не найдено.", + "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -136,12 +136,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1017,6 +1021,11 @@ "relations": [ { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1057,6 +1066,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1097,6 +1111,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1137,6 +1156,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1177,6 +1201,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1217,6 +1246,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1256,6 +1290,7 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.configuration\n -> RuntimeManager.add_config_file" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [ { @@ -2188,9 +2223,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 41, - "C2_DEPENDENCY_GRAPH": 61, - "C0_SOURCE_CHUNKS": 15 + "C1_SYMBOL_CATALOG": 48, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 21 } } }, @@ -2204,6 +2239,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2216,7 +2254,7 @@ "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2255,8 +2293,42 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 2, + "retrieval": 130, + "pre_evidence_gate": 1, + "llm": 1947, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -3128,6 +3200,138 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 130 + }, + "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": 48, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 21 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1947 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md new file mode 100644 index 0000000..3cd0b95 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-runtime-manager.md @@ -0,0 +1,269 @@ +# plba-v2-find-tests-runtime-manager + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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`.\n\nКосвенные тесты:\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" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 130 + }, + "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": 48, + "C2_DEPENDENCY_GRAPH": 60, + "C0_SOURCE_CHUNKS": 21 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 1947 + }, + "output": { + "prompt_name": "code_qa_find_tests_answer", + "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 2, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`.", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`.\n\nКосвенные тесты:\n- В файле `tests/test_business_control_actions.py` есть тесты, использующие компоненты контроля, которые взаимодействуют с `RuntimeManager`." + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 2, + "retrieval": 130, + "pre_evidence_gate": 1, + "llm": 1947, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json similarity index 94% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json index b6879ec..e4d2029 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для TraceService?", @@ -10,7 +10,7 @@ "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`: проверяет поддержку различных уровней логирования.", + "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": [ @@ -136,12 +136,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "TraceService", "alternatives": [ + "TraceService", + "TraceService", + "TraceService", + "TraceService", "TraceService" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1013,6 +1017,11 @@ "relations": [ { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 61, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.create_context", "metadata": { "edge_id": "3b052062067a78aef3302ee1d996897e02a67d1b340397bea4f59fe147c0492a", "edge_type": "dataflow_slice", @@ -1053,6 +1062,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 84, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.close_context", "metadata": { "edge_id": "7a9353ef57c9ae5d19b3a0c6ac50fad05e6d21d31bbe1cd1cd07af6332ba6505", "edge_type": "dataflow_slice", @@ -1093,6 +1107,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 78, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.open_context", "metadata": { "edge_id": "a6e13b9ebc4fed84586afd53ed92a4d14757e440873f572b2337d5622ee96031", "edge_type": "dataflow_slice", @@ -1133,6 +1152,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 41, + "end_line": 43, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.__init__", "metadata": { "edge_id": "1e923a93faa05c3c43ca9b19bd047007a8589ccce57d3cc1798ae7f9f200af98", "edge_type": "dataflow_slice", @@ -1173,6 +1197,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 81, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.current_trace_id", "metadata": { "edge_id": "3ea17138634b1190bded77ddb84aa1595124f6519b246f24fc4b02bd62b5cac1", "edge_type": "dataflow_slice", @@ -1213,6 +1242,11 @@ }, { "path": "src/app_runtime/tracing/service.py", + "start_line": 42, + "end_line": 88, + "edge_type": "dataflow_slice", + "source": "TraceService.__init__", + "target": "TraceService.step", "metadata": { "edge_id": "9f34c5da9b09fba99df6f6b1bde183a9aeb45111b8218a747c71590c2c9f60f2", "edge_type": "dataflow_slice", @@ -1252,6 +1286,7 @@ "content": "TraceService.__init__\n -> TraceService.store\n -> TraceService.step" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [ { @@ -2189,9 +2224,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 32, - "C2_DEPENDENCY_GRAPH": 34, - "C0_SOURCE_CHUNKS": 14 + "C1_SYMBOL_CATALOG": 34, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 16 } } }, @@ -2205,6 +2240,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2217,7 +2255,7 @@ "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2256,8 +2294,42 @@ "failure_reasons": [], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 90, + "pre_evidence_gate": 1, + "llm": 2378, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -3129,6 +3201,138 @@ "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": 90 + }, + "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": 34, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2378 + }, + "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- `test_trace_service_s", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md new file mode 100644 index 0000000..efd65ba --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-trace-service.md @@ -0,0 +1,269 @@ +# plba-v2-find-tests-trace-service + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_TESTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 90 + }, + "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": 34, + "C2_DEPENDENCY_GRAPH": 38, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 2378 + }, + "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- `test_trace_service_s", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C1_SYMBOL_CATALOG", + "C2_DEPENDENCY_GRAPH", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "TraceService", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "TraceService", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 3, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "TraceService", + "draft_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- `test_trace_service_s", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_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- `test_trace_service_s" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 90, + "pre_evidence_gate": 1, + "llm": 2378, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json similarity index 95% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json index 7fa9a08..6ad444f 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где тесты для WorkflowRuntimeFactory?", @@ -136,12 +136,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "WorkflowRuntimeFactory", "alternatives": [ - "WorkflowRuntimeFactory" + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory", + "WorkflowRuntimeFactory.__init__", + "WorkflowRuntimeFactory.create_engine" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -986,6 +990,11 @@ "relations": [ { "path": "src/app_runtime/workflow/runtime_factory.py", + "start_line": 11, + "end_line": 19, + "edge_type": "dataflow_slice", + "source": "WorkflowRuntimeFactory.__init__", + "target": "WorkflowRuntimeFactory.create_engine", "metadata": { "edge_id": "db6124c75b447e4a0a9ba267bd6d6cdf267b41a733b2843d724dd42ec6f4945d", "edge_type": "dataflow_slice", @@ -1026,6 +1035,11 @@ }, { "path": "src/app_runtime/workflow/runtime_factory.py", + "start_line": 12, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "WorkflowRuntimeFactory.__init__", + "target": "WorkflowRuntimeFactory.create_engine", "metadata": { "edge_id": "f46f5a871a3800b517b0f94ed2551392629e1d7920bc3e3b5a21e0d8f012b741", "edge_type": "dataflow_slice", @@ -1066,6 +1080,11 @@ }, { "path": "src/app_runtime/workflow/runtime_factory.py", + "start_line": 9, + "end_line": 16, + "edge_type": "dataflow_slice", + "source": "WorkflowRuntimeFactory.__init__", + "target": "WorkflowRuntimeFactory.create_engine", "metadata": { "edge_id": "543624853400c556d1939007017145281d76b00a694c7d5c4fbb0414ded3434e", "edge_type": "dataflow_slice", @@ -1106,6 +1125,11 @@ }, { "path": "src/app_runtime/workflow/runtime_factory.py", + "start_line": 10, + "end_line": 19, + "edge_type": "dataflow_slice", + "source": "WorkflowRuntimeFactory.__init__", + "target": "WorkflowRuntimeFactory.create_engine", "metadata": { "edge_id": "346cf5ddb4308b8403d27c5b54da8cba298bb0af7dc04c2fe30312ef574103c6", "edge_type": "dataflow_slice", @@ -1146,6 +1170,11 @@ }, { "path": "src/app_runtime/workflow/runtime_factory.py", + "start_line": 12, + "end_line": 12, + "edge_type": "writes_attr", + "source": "WorkflowRuntimeFactory.__init__", + "target": "WorkflowRuntimeFactory._snapshot_sanitizer", "metadata": { "edge_id": "de0cb1913ba41f673cfb601cab23cfb2e1044ed3dd8c061aff486075aeb8af20", "edge_type": "writes_attr", @@ -1170,6 +1199,11 @@ }, { "path": "src/app_runtime/workflow/runtime_factory.py", + "start_line": 15, + "end_line": 18, + "edge_type": "calls", + "source": "WorkflowRuntimeFactory.create_engine", + "target": "WorkflowPersistence.create_default", "metadata": { "edge_id": "fa86efb6871092fc88df68295c0d92dbe46253e1afa3246ca62b6da11d4d5569", "edge_type": "calls", @@ -1193,6 +1227,7 @@ "content": "WorkflowRuntimeFactory.create_engine calls WorkflowPersistence.create_default" } ], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -2082,9 +2117,9 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 24, - "C2_DEPENDENCY_GRAPH": 27, - "C0_SOURCE_CHUNKS": 12 + "C1_SYMBOL_CATALOG": 31, + "C2_DEPENDENCY_GRAPH": 43, + "C0_SOURCE_CHUNKS": 16 } } }, @@ -2098,6 +2133,9 @@ ], "retrieval_sufficient": false, "answer_mode": "degraded", + "resolved_target": "WorkflowRuntimeFactory", + "answer_policy_branch": "evidence_gate_short_circuit", + "decision_reason": "tests_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -2110,7 +2148,7 @@ "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -2151,10 +2189,37 @@ ], "evidence_count": 24 }, + "evidence_gate_input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "tests_not_found" ], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 91, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -2996,6 +3061,131 @@ "reasons": [ "degraded_answer_missing_guardrail" ] - } + }, + "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": 91 + }, + "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": 31, + "C2_DEPENDENCY_GRAPH": 43, + "C0_SOURCE_CHUNKS": 16 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": false, + "failure_reasons": [ + "tests_not_found" + ], + "degraded_message": "Insufficient evidence for a confident answer. No test candidates found.", + "evidence_count": 24 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "degraded", + "decision_reason": "tests_not_found", + "answer_policy_branch": "evidence_gate_short_circuit" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, + "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-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md similarity index 57% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md index 81f0f7b..aa1031c 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-find-tests-workflow-runtime-factory-negative.md @@ -1,12 +1,12 @@ -# plba-v2-find-tests-runtime-manager +# 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml - runner: agent_runtime - mode: full_chain - passed: True ## Query -Где тесты для RuntimeManager? +Где тесты для WorkflowRuntimeFactory? ## Actual { @@ -15,11 +15,11 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 24, - "llm_answer": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено.", - "answer_mode": "answered", + "llm_answer": "Insufficient evidence for a confident answer. No test candidates found.", + "answer_mode": "degraded", "path_scope": [], "symbol_candidates": [ - "RuntimeManager" + "WorkflowRuntimeFactory" ], "layers": [ "C1_SYMBOL_CATALOG", @@ -47,13 +47,13 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 141 + "retrieval": 91 }, "output": { "rag_count": 24, "answer_path_rag_count": 24, "resolved_symbol_status": "resolved", - "resolved_symbol": "RuntimeManager", + "resolved_symbol": "WorkflowRuntimeFactory", "requested_layers": [ "C1_SYMBOL_CATALOG", "C2_DEPENDENCY_GRAPH", @@ -92,46 +92,65 @@ "reason": null }, "retrieval_by_layer_ms": { - "C1_SYMBOL_CATALOG": 58, - "C2_DEPENDENCY_GRAPH": 58, - "C0_SOURCE_CHUNKS": 24 + "C1_SYMBOL_CATALOG": 31, + "C2_DEPENDENCY_GRAPH": 43, + "C0_SOURCE_CHUNKS": 16 } } }, { "step": "pre_evidence_gate", - "status": "passed", + "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] }, "output": { - "passed": true, - "failure_reasons": [], - "degraded_message": "" + "passed": false, + "failure_reasons": [ + "tests_not_found" + ], + "degraded_message": "Insufficient evidence for a confident answer. No test candidates found.", + "evidence_count": 24 } }, { "step": "llm", - "status": "completed", + "status": "skipped", "timings_ms": { - "llm": 584 + "llm": 1 }, "output": { - "prompt_name": "code_qa_find_tests_answer", - "answer_preview": "Прямые тесты для `RuntimeManager` находятся в файле `tests/test_runtime.py`. Эти тесты проверяют инициализацию и поведение объекта `RuntimeManager`.\n\nКосвенных тестов, явно связанных с `RuntimeManager`, больше нигде не обнаружено." + "reason": "policy_short_circuit", + "answer_mode": "degraded", + "decision_reason": "tests_not_found", + "answer_policy_branch": "evidence_gate_short_circuit" } }, { "step": "post_evidence_gate", - "status": "passed", + "status": "skipped", "timings_ms": { - "post_evidence_gate": 0, - "repair": 0 + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" }, "output": { - "passed": true, - "reasons": [], - "repair_used": false + "reason": "no_draft_answer" } } ] @@ -145,8 +164,11 @@ "C2_DEPENDENCY_GRAPH", "C0_SOURCE_CHUNKS" ], - "retrieval_sufficient": true, - "answer_mode": "normal", + "retrieval_sufficient": false, + "answer_mode": "degraded", + "resolved_target": "WorkflowRuntimeFactory", + "answer_policy_branch": "evidence_gate_short_circuit", + "decision_reason": "tests_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -163,7 +185,7 @@ }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", - "query": "Где тесты для RuntimeManager?", + "query": "Где тесты для WorkflowRuntimeFactory?", "sub_intent": "FIND_TESTS", "path_scope": [], "requested_layers": [ @@ -194,16 +216,42 @@ ], "empty_layers": [], "evidence_gate_decision": { - "sufficient": true, - "failure_reasons": [], + "sufficient": false, + "failure_reasons": [ + "tests_not_found" + ], "evidence_count": 24 }, - "failure_reasons": [], + "evidence_gate_input": { + "resolved_target": "WorkflowRuntimeFactory", + "sub_intent": "FIND_TESTS", + "target_type": "symbol", + "evidence_count": 24, + "code_chunk_count": 24, + "entrypoint_count": 0, + "relation_count": 6, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "degraded", + "draft_present": false, + "resolved_target": "WorkflowRuntimeFactory" + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "tests_not_found" + ], "timings_ms": { "router": 1, - "retrieval": 141, - "pre_evidence_gate": 0, - "llm": 584 + "retrieval": 91, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } } 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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json similarity index 65% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json index aea7b21..e84eb84 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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", @@ -10,7 +10,7 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 0, - "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", "answer_mode": "not_found", "path_scope": [ "src/app_runtime/core/missing_runtime.py" @@ -20,11 +20,8 @@ "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 не найден.'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Открой файл src/app_runtime/core/missing_runtime.py", "router_result": { @@ -226,6 +223,7 @@ "file_candidates": [], "code_chunks": [], "relations": [], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -269,7 +267,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 23 + "C0_SOURCE_CHUNKS": 14 } } }, @@ -281,6 +279,9 @@ ], "retrieval_sufficient": false, "answer_mode": "insufficient", + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "answer_policy_branch": "open_file_not_found", + "decision_reason": "path_scope_empty", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -325,17 +326,167 @@ ], "evidence_count": 0 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "path_scope_empty", "layer_c0_empty" ], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 15, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } }, "rag_rows": [], "validation": { "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 15 + }, + "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": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "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.", + "evidence_count": 0 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "path_scope_empty", + "answer_policy_branch": "open_file_not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "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_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..8f60590 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-nonexistent.md @@ -0,0 +1,245 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 15 + }, + "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": 14 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "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.", + "evidence_count": 0 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "path_scope_empty", + "answer_policy_branch": "open_file_not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "answer_policy_branch": "open_file_not_found", + "decision_reason": "path_scope_empty", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 1, + "retrieval": 15, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json similarity index 78% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json index 32fe9ba..d0e1590 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Открой файл src/plba/__init__.py", @@ -10,7 +10,7 @@ "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", + "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` (упомянут частично)", "answer_mode": "answered", "path_scope": [ "src/plba/__init__.py" @@ -250,6 +250,7 @@ } ], "relations": [], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -322,7 +323,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 24 + "C0_SOURCE_CHUNKS": 36 } } }, @@ -334,6 +335,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -373,12 +377,43 @@ "failure_reasons": [], "evidence_count": 1 }, + "evidence_gate_input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: `", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: `" + } + }, "failure_reasons": [], "timings_ms": { - "router": 0, - "retrieval": 24, - "pre_evidence_gate": 0, - "llm": 1406 + "router": 1, + "retrieval": 36, + "pre_evidence_gate": 1, + "llm": 5422, + "post_evidence_gate": 1 } }, "rag_rows": [ @@ -423,7 +458,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 1 }, "output": { "intent": "CODE_QA", @@ -436,7 +471,7 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 24 + "retrieval": 36 }, "output": { "rag_count": 1, @@ -476,7 +511,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 24 + "C0_SOURCE_CHUNKS": 36 } } }, @@ -484,36 +519,64 @@ "step": "pre_evidence_gate", "status": "passed", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] }, "output": { "passed": true, "failure_reasons": [], - "degraded_message": "" + "degraded_message": "", + "evidence_count": 1 } }, { "step": "llm", "status": "completed", "timings_ms": { - "llm": 1406 + "llm": 5422 }, "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" + "answer_preview": "Файл `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`: `", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" } }, { "step": "post_evidence_gate", "status": "passed", "timings_ms": { - "post_evidence_gate": 0, + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, "repair": 0 }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: `", + "repair_candidate": true + }, "output": { "passed": true, + "action": "return", "reasons": [], - "repair_used": false + "repair_used": false, + "final_answer_preview": "Файл `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`: `" } } ] diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md new file mode 100644 index 0000000..afa6048 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-public-api.md @@ -0,0 +1,250 @@ +# plba-v2-open-file-public-api + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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.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` (упомянут частично)", + "answer_mode": "answered", + "path_scope": [ + "src/plba/__init__.py" + ], + "symbol_candidates": [], + "layers": [ + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 36 + }, + "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": 36 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 5422 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "Файл `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`: `", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: `", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: `" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/plba/__init__.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/plba/__init__.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/plba/__init__.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/plba/__init__.py", + "draft_answer_preview": "Файл `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`: `", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Файл `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`: `" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 36, + "pre_evidence_gate": 1, + "llm": 5422, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json similarity index 79% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json index 3df8028..4016ab4 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Открой файл src/app_runtime/core/runtime.py", @@ -10,7 +10,7 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 1, - "llm_answer": "Виден класс `RuntimeManager` с инициализатором и статическими полями. Файл содержит 162 строки кода.", + "llm_answer": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n- `services: ServiceContainer | None`\n- `traces: TraceService | None`\n- `health: HealthRegistry | None`\n- `logs: LogManager | None`\n- `workers: WorkerSupervisor | None`\n- `control_plane: ControlPlaneService | None`\n\nЕсли аргумент не передан, используется значение по умолчанию – новый экземпляр соответствующего менеджера или сервиса.", "answer_mode": "answered", "path_scope": [ "src/app_runtime/core/runtime.py" @@ -250,6 +250,7 @@ } ], "relations": [], + "semantic_hints": [], "entrypoints": [], "test_candidates": [], "layer_outcomes": [ @@ -322,7 +323,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 136 + "C0_SOURCE_CHUNKS": 295 } } }, @@ -334,6 +335,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -373,8 +377,44 @@ "failure_reasons": [], "evidence_count": 1 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 295, + "pre_evidence_gate": 1, + "llm": 4019, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -412,6 +452,133 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 295 + }, + "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": 295 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4019 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md new file mode 100644 index 0000000..7666de1 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-open-file-runtime.md @@ -0,0 +1,250 @@ +# plba-v2-open-file-runtime + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n- `services: ServiceContainer | None`\n- `traces: TraceService | None`\n- `health: HealthRegistry | None`\n- `logs: LogManager | None`\n- `workers: WorkerSupervisor | None`\n- `control_plane: ControlPlaneService | None`\n\nЕсли аргумент не передан, используется значение по умолчанию – новый экземпляр соответствующего менеджера или сервиса.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 295 + }, + "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": 295 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 1 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4019 + }, + "output": { + "prompt_name": "code_qa_open_file_answer", + "answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/core/runtime.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "file", + "evidence_count": 1, + "code_chunk_count": 1, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/core/runtime.py", + "draft_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "В файле `src/app_runtime/core/runtime.py` определён класс `RuntimeManager`.\nУ него есть несколько атрибутов класса:\n- `ACTION_TIMEOUT_SECONDS = 10.0`\n- `ACTION_POLL_INTERVAL_SECONDS = 0.05`\n\nКонструктор принимает следующие параметры (все опциональны):\n- `configuration: ConfigurationManager | None`\n-" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 295, + "pre_evidence_gate": 1, + "llm": 4019, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json index e9e2341..3decbe7 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Покажи как проходит запрос /health в HttpControlAppFactory", @@ -10,7 +10,7 @@ "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Таким образом, ключевой точкой является вызов провайдера здоровья внутри фабрики приложений, от которого зависит итоговый результат ответа.", + "llm_answer": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`health_provider`), переданного в фабрику приложений.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n3. Провайдер здоровья реализуется методом `_health_response` в классе `HttpControlChannel`. Он проверяет наличие действий (`_actions`) и возвращает статус здоровья.\n - Путь: `src/app_runtime/control/http_channel.py`\n - Строки: 44–50\n\nТаким образом, запрос `/health` проходит через эти компоненты для получения ответа о состоянии системы.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -135,13 +135,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "HttpControlAppFactory", "alternatives": [ - "health", - "HttpControlAppFactory" + "HttpControlAppFactory", + "HttpControlAppFactory", + "ControlActionSet", + "ControlPlaneService", + "HealthContributor.health" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1414,6 +1417,11 @@ "relations": [ { "path": "src/app_runtime/health/registry.py", + "start_line": 10, + "end_line": 13, + "edge_type": "dataflow_slice", + "source": "HealthRegistry.__init__", + "target": "HealthRegistry.register", "metadata": { "edge_id": "2381dfb339d541367c3251d2a610cac9d8b3f6bd6a352e119d00a93c5ccc2b7d", "edge_type": "dataflow_slice", @@ -1454,6 +1462,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1494,6 +1507,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1534,6 +1552,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1574,6 +1597,11 @@ }, { "path": "src/app_runtime/health/registry.py", + "start_line": 10, + "end_line": 16, + "edge_type": "dataflow_slice", + "source": "HealthRegistry.__init__", + "target": "HealthRegistry.contributor_healths", "metadata": { "edge_id": "d3a88a7abf16359e903e809ffc24473658fdd8198f60641fe1584fc4ac663c31", "edge_type": "dataflow_slice", @@ -1614,6 +1642,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1654,6 +1687,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1694,6 +1732,11 @@ }, { "path": "src/app_runtime/control/http_app.py", + "start_line": 25, + "end_line": 25, + "edge_type": "calls", + "source": "HttpControlAppFactory.create", + "target": "time.monotonic", "metadata": { "edge_id": "3fdd0a88d10225ee74f3b84ab57e13f09f5ccc72f00e31af9ae4655411c289c0", "edge_type": "calls", @@ -1718,6 +1761,11 @@ }, { "path": "src/app_runtime/control/http_app.py", + "start_line": 37, + "end_line": 37, + "edge_type": "calls", + "source": "HttpControlAppFactory.create", + "target": "app.post", "metadata": { "edge_id": "0e545d4b5187db7bec5ceac03071d2ad68177550c42af748fee364639e533c90", "edge_type": "calls", @@ -1742,6 +1790,11 @@ }, { "path": "src/app_runtime/control/http_app.py", + "start_line": 27, + "end_line": 27, + "edge_type": "calls", + "source": "HttpControlAppFactory.create", + "target": "str", "metadata": { "edge_id": "2a87c51461e31cd556508cc37fdff37b4d24c26f7f1604db30af5e8f1bda96cb", "edge_type": "calls", @@ -1765,37 +1818,83 @@ "content": "HttpControlAppFactory.create calls str" } ], + "semantic_hints": [ + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/health/registry.py", + "title": "HealthRegistry", + "symbol": "HealthRegistry", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HealthRegistry\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (2)" + }, + { + "path": "src/app_runtime/core/types.py", + "title": "HealthPayload", + "symbol": "HealthPayload", + "role": "model", + "confidence": 0.99, + "content": "HealthPayload\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/contracts/health.py", + "title": "HealthContributor", + "symbol": "HealthContributor", + "role": "model", + "confidence": 0.99, + "content": "HealthContributor\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + } + ], "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", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1823,6 +1922,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1846,6 +1952,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3267,11 +3407,11 @@ "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 + "C1_SYMBOL_CATALOG": 58, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 } } }, @@ -3287,6 +3427,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3301,7 +3444,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -3354,8 +3497,42 @@ "failure_reasons": [], "evidence_count": 37 }, + "evidence_gate_input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 165, + "pre_evidence_gate": 1, + "llm": 4961, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -4702,6 +4879,154 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 165 + }, + "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": 58, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4961 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md new file mode 100644 index 0000000..532c500 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-health-endpoint.md @@ -0,0 +1,306 @@ +# plba-v2-trace-flow-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`health_provider`), переданного в фабрику приложений.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n3. Провайдер здоровья реализуется методом `_health_response` в классе `HttpControlChannel`. Он проверяет наличие действий (`_actions`) и возвращает статус здоровья.\n - Путь: `src/app_runtime/control/http_channel.py`\n - Строки: 44–50\n\nТаким образом, запрос `/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" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 165 + }, + "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": 58, + "C0_SOURCE_CHUNKS": 21, + "C4_SEMANTIC_ROLES": 19, + "C2_DEPENDENCY_GRAPH": 54, + "C3_ENTRYPOINTS": 11 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 4961 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea" + } + } +] + +## 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", + "resolved_target": "HttpControlAppFactory", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "HttpControlAppFactory", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "HttpControlAppFactory", + "draft_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Запрос `/health` обрабатывается следующим образом:\n\n1. В `HttpControlAppFactory` создаётся маршрут `@app.get(\"/health\")`, который вызывает функцию `health`.\n - Путь: `src/app_runtime/control/http_app.py`\n - Строки: 31–34\n\n2. Функция `health` асинхронно ожидает данные от провайдера здоровья (`hea" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 165, + "pre_evidence_gate": 1, + "llm": 4961, + "post_evidence_gate": 1 + } +} + +## 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_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json similarity index 93% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json index d03e20f..6ada923 100644 --- 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_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/cases/suite_02_pipeline/full_chain_plba_code_subintents_v2.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Покажи поток выполнения при запуске RuntimeManager", @@ -10,7 +10,7 @@ "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Таким образом, поток начинается с инициализации менеджера времени выполнения и завершается запуском веб-канала управления.", + "llm_answer": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core_services`.\n5. Старт менеджера методом `start`.\n\nЭти шаги соответствуют обнаруженному коду в файле `src/app_runtime/core/runtime.py`. \n\nДальнейший поток выполнения внутри методов (`_register_core_services`, `start`) восстановить полностью не представляется возможным, поскольку вызываемый код отсутствует в текущем контексте.", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -120,12 +120,16 @@ } }, "symbol_resolution": { - "status": "pending", - "resolved_symbol": null, + "status": "resolved", + "resolved_symbol": "RuntimeManager", "alternatives": [ + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", + "RuntimeManager", "RuntimeManager" ], - "confidence": 0.0 + "confidence": 0.99 }, "evidence_policy": { "require_def": true, @@ -1431,6 +1435,11 @@ "relations": [ { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 52, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.add_config_file", "metadata": { "edge_id": "a23b8a11ebdb12708b60c96ea12a69f7f042082f1adfddd572444e246d81d167", "edge_type": "dataflow_slice", @@ -1471,6 +1480,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 33, + "end_line": 39, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.__init__", "metadata": { "edge_id": "d43af85989222ee6d788ce418cdcb217c7ff044cfb915e3bdbd184417dc7bd61", "edge_type": "dataflow_slice", @@ -1511,6 +1525,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 25, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.stop", "metadata": { "edge_id": "d5433e2950fb6f913453de2694d697f2c5c5b0e759501aa31c37125d4d29c118", "edge_type": "dataflow_slice", @@ -1551,6 +1570,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 51, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._stop_async", "metadata": { "edge_id": "991ae894d11340626f4d9361e176c5009c2f33d95ce1a8864740bc85306accc3", "edge_type": "dataflow_slice", @@ -1591,6 +1615,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 59, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager.start", "metadata": { "edge_id": "98312ace7fc62b1c7194c5aa1732b6ef736eae1668a3a120dd1ecd5ab1d64f7a", "edge_type": "dataflow_slice", @@ -1631,6 +1660,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 32, + "end_line": 127, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager._register_core_services", "metadata": { "edge_id": "3e5811f3b511fa0cabe363f5d01f2ac5fa039bc8b93f7ee108323e1f5f45a293", "edge_type": "dataflow_slice", @@ -1671,6 +1705,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 17, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.register_channel", "metadata": { "edge_id": "e21fe35e6cd37bb929561a316c9b5156bd379de768b11d96c989a75a4a9330f2", "edge_type": "dataflow_slice", @@ -1711,6 +1750,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 20, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService.start", "metadata": { "edge_id": "dc85f1ea8fe46c5223a32b4623a249512af7ea30f3af0d890c2fbe842c74d3c2", "edge_type": "dataflow_slice", @@ -1751,6 +1795,11 @@ }, { "path": "src/app_runtime/control/service.py", + "start_line": 14, + "end_line": 47, + "edge_type": "dataflow_slice", + "source": "ControlPlaneService.__init__", + "target": "ControlPlaneService._start_async", "metadata": { "edge_id": "e8e2ddef7499bed745cce7a83d5130d145e9787ca9ddc73f5898372a8da2be06", "edge_type": "dataflow_slice", @@ -1791,6 +1840,11 @@ }, { "path": "src/app_runtime/core/runtime.py", + "start_line": 33, + "end_line": 127, + "edge_type": "dataflow_slice", + "source": "RuntimeManager.__init__", + "target": "RuntimeManager._register_core_services", "metadata": { "edge_id": "aac6f9dda73963b977083a892bee39a48eca4fbd7404787e022ecf4ebedec65d", "edge_type": "dataflow_slice", @@ -1830,37 +1884,83 @@ "content": "RuntimeManager.__init__\n -> RuntimeManager.services\n -> RuntimeManager._register_core_services" } ], - "entrypoints": [ + "semantic_hints": [ { - "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/core/runtime.py", + "title": "RuntimeManager", + "symbol": "RuntimeManager", + "role": "pipeline_stage", + "confidence": 0.67, + "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)" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlChannel", + "symbol": "ControlChannel", + "role": "model", + "confidence": 0.99, + "content": "ControlChannel\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/base.py", + "title": "ControlActionSet", + "symbol": "ControlActionSet", + "role": "model", + "confidence": 0.99, + "content": "ControlActionSet\nrole: model\n\nResponsibilities:\n- default model role" + }, + { + "path": "src/app_runtime/control/service.py", + "title": "ControlPlaneService", + "symbol": "ControlPlaneService", + "role": "pipeline_stage", + "confidence": 0.57, + "content": "ControlPlaneService\nrole: pipeline_stage\n\nResponsibilities:\n- name suffix suggests service\n- reads and writes state attributes\n- participates in dataflow slices (5)" + }, + { + "path": "src/app_runtime/control/http_runner.py", + "title": "UvicornThreadRunner", + "symbol": "UvicornThreadRunner", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "UvicornThreadRunner\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (24)" + }, + { + "path": "src/app_runtime/control/http_channel.py", + "title": "HttpControlChannel", + "symbol": "HttpControlChannel", + "role": "pipeline_stage", + "confidence": 0.99, + "content": "HttpControlChannel\nrole: pipeline_stage\n\nResponsibilities:\n- reads and writes state attributes\n- participates in dataflow slices (10)" }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "HttpControlAppFactory", + "symbol": "HttpControlAppFactory", + "role": "factory", + "confidence": 0.99, + "content": "HttpControlAppFactory\nrole: factory\n\nResponsibilities:\n- name suffix suggests factory" + }, + { + "path": "src/app_runtime/workflow/persistence/workflow_persistence.py", + "title": "WorkflowPersistence", + "symbol": "WorkflowPersistence", + "role": "pipeline_stage", + "confidence": 0.99, + "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)" + } + ], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -1888,6 +1988,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -1911,6 +2018,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -3380,11 +3521,11 @@ "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 + "C1_SYMBOL_CATALOG": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 12 } } }, @@ -3400,6 +3541,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -3414,7 +3558,7 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "resolved" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -3467,8 +3611,42 @@ "failure_reasons": [], "evidence_count": 37 }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core" + } + }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 154, + "pre_evidence_gate": 1, + "llm": 3180, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -4863,6 +5041,154 @@ "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 154 + }, + "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": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3180 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/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_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md new file mode 100644 index 0000000..3e43f45 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/full_chain_plba_code_subintents_v2_plba-v2-trace-flow-runtime-start.md @@ -0,0 +1,305 @@ +# plba-v2-trace-flow-runtime-start + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/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. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core_services`.\n5. Старт менеджера методом `start`.\n\nЭти шаги соответствуют обнаруженному коду в файле `src/app_runtime/core/runtime.py`. \n\nДальнейший поток выполнения внутри методов (`_register_core_services`, `start`) восстановить полностью не представляется возможным, поскольку вызываемый код отсутствует в текущем контексте.", + "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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "TRACE_FLOW", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 154 + }, + "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": 43, + "C0_SOURCE_CHUNKS": 20, + "C4_SEMANTIC_ROLES": 16, + "C2_DEPENDENCY_GRAPH": 61, + "C3_ENTRYPOINTS": 12 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 37 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3180 + }, + "output": { + "prompt_name": "code_qa_trace_flow_answer", + "answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core" + } + } +] + +## 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", + "resolved_target": "RuntimeManager", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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 + }, + "evidence_gate_input": { + "resolved_target": "RuntimeManager", + "sub_intent": "TRACE_FLOW", + "target_type": "symbol", + "evidence_count": 37, + "code_chunk_count": 37, + "entrypoint_count": 3, + "relation_count": 10, + "test_evidence_count": 0, + "symbol_resolution_status": "resolved", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "RuntimeManager", + "draft_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "При запуске `RuntimeManager` выполняются следующие шаги:\n\n1. Инициализация конфигурации через поле `configuration`.\n2. Добавление конфигурационных файлов методом `add_config_file`.\n3. Инициализация сервисов методом `__init__` внутри конструктора.\n4. Регистрация основных служб методом `_register_core" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 154, + "pre_evidence_gate": 1, + "llm": 3180, + "post_evidence_gate": 1 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/summary.md b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/summary.md new file mode 100644 index 0000000..bba7737 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_full_chain_subintents_v3/20260312_192715/summary.md @@ -0,0 +1,80 @@ +# pipeline_setup_v3 summary + +Passed: 18/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:7, 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 | — | ✓ | + +## LLM Answers +- **plba-v2-open-file-runtime** + Query: Открой файл src/app_runtime/core/runtime.py + > В файле \`src/app\_runtime/core/runtime.py\` определён класс \`RuntimeManager\`. У него есть несколько атрибутов класса: \- \`ACTION\_TIMEOUT\_SECONDS = 10.0\` \- \`ACTION\_POLL\_INTERVAL\_SECONDS = 0.05\` Конструктор принимает следующие параметры \(все опциональны\): \- \`configuration: ConfigurationManager \| None\` \- \`services: ServiceContainer \| None\` \- \`traces: TraceService \| None\` \- \`health: HealthRegistry \| None\` \- \`logs: LogManager \| None\` \- \`workers: WorkerSupervisor \| None\` \- \`control\_plane: ControlPlaneService \| None\` Если аргумент не передан, используется значение по умолчанию – новый экземпляр соответствующего менеджера или сервиса. +- **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\` \(упомянут частично\) +- **plba-v2-explain-runtime-manager** + Query: Объясни как работает класс RuntimeManager + > Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager. +- **plba-v2-explain-trace-service** + Query: Объясни как работает класс TraceService + > Недостаточно подтверждённых данных для уверенного ответа по TraceService. +- **plba-v2-explain-create-runtime** + Query: Что делает функция create_runtime? + > Функция \`create\_runtime\` определена в файле \`src/plba/bootstrap.py\`. Она создаёт и конфигурирует экземпляр \`RuntimeManager\`, регистрируя модуль приложения и опционально добавляя файл конфигурации и HTTP\-канал управления. Основные действия функции: \- Создаёт экземпляр \`RuntimeManager\`. \- Если передан путь к конфигурационному файлу, вызывает \`runtime.add\_config\_file\(config\_path\)\` для добавления конфигурации. \- Если включён HTTP\-контроль, регистрирует HTTP\-канал управления через \`runtime.control\_plane.register\_channel\(HttpControlChannel\(host=control\_host, port=control\_port, timeout=control\_timeout\)\)\`. \- Регистрирует модуль приложения методом \`runtime.register\_module\(module\)\`. Возвращает сконфигурированный объект типа \`RuntimeManager\`. +- **plba-v2-explain-local-http-channel** + Query: Почему в файле src/app_runtime/control/http_channel.py класс HttpControlChannel устроен так? + > Класс HttpControlChannel наследует ControlChannel и управляет HTTP\-каналом контроля. Инициализация задает хост, порт, таймаут, создаёт экземпляр UvicornThreadRunner для запуска сервера и HttpControlAppFactory для создания FastAPI\-приложения. Метод start запускает сервер с приложением, используя фабрики и передавая коллбэки здоровья и действий. Методы \_health\_response и \_action\_response \(не полностью показаны\) вероятно отвечают за обработчики API\-эндпоинтов здоровья и выполнения действий. Остальные детали, такие как полный контекст методов или их реализации, отсутствуют в данном фрагменте. +- **plba-v2-find-tests-runtime-manager** + Query: Где тесты для RuntimeManager? + > Прямые тесты для \`RuntimeManager\` находятся в файле \`tests/test\_runtime.py\`. Косвенные тесты: \- В файле \`tests/test\_business\_control\_actions.py\` есть тесты, использующие компоненты контроля, которые взаимодействуют с \`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::test\_public\_plba\_package\_exports\_runtime\_builder\_and\_worker\_contract\` \- Проверяет экспорт пакета plba и доступность создания runtime, включая worker контракты. +- **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 routes: 1. GET /health — обработчик \`health\`, объявлен в \`src/app\_runtime/control/http\_app.py\`:31\-34. 2. GET /actions/\{action\} — обработчик \`action\`, объявлен в \`src/app\_runtime/control/http\_app.py\`:38\-42. 3. POST /actions/\{action\} — обработчик \`action\`, объявлен в \`src/app\_runtime/control/http\_app.py\`:38\-42. Кандидаты на входные точки отсутствуют. +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Подтверждённая точка входа для health endpoint: GET /health, declared in src/app\_runtime/control/http\_app.py, lines 31\-34, handler function named 'health'. +- **plba-v2-trace-flow-runtime-start** + Query: Покажи поток выполнения при запуске RuntimeManager + > При запуске \`RuntimeManager\` выполняются следующие шаги: 1. Инициализация конфигурации через поле \`configuration\`. 2. Добавление конфигурационных файлов методом \`add\_config\_file\`. 3. Инициализация сервисов методом \`\_\_init\_\_\` внутри конструктора. 4. Регистрация основных служб методом \`\_register\_core\_services\`. 5. Старт менеджера методом \`start\`. Эти шаги соответствуют обнаруженному коду в файле \`src/app\_runtime/core/runtime.py\`. Дальнейший поток выполнения внутри методов \(\`\_register\_core\_services\`, \`start\`\) восстановить полностью не представляется возможным, поскольку вызываемый код отсутствует в текущем контексте. +- **plba-v2-trace-flow-health-endpoint** + Query: Покажи как проходит запрос /health в HttpControlAppFactory + > Запрос \`/health\` обрабатывается следующим образом: 1. В \`HttpControlAppFactory\` создаётся маршрут \`@app.get\("/health"\)\`, который вызывает функцию \`health\`. \- Путь: \`src/app\_runtime/control/http\_app.py\` \- Строки: 31–34 2. Функция \`health\` асинхронно ожидает данные от провайдера здоровья \(\`health\_provider\`\), переданного в фабрику приложений. \- Путь: \`src/app\_runtime/control/http\_app.py\` \- Строки: 31–34 3. Провайдер здоровья реализуется методом \`\_health\_response\` в классе \`HttpControlChannel\`. Он проверяет наличие действий \(\`\_actions\`\) и возвращает статус здоровья. \- Путь: \`src/app\_runtime/control/http\_channel.py\` \- Строки: 44–50 Таким образом, запрос \`/health\` проходит через эти компоненты для получения ответа о состоянии системы. +- **plba-v2-architecture-runtime-manager** + Query: Какие компоненты участвуют в RuntimeManager? + > Недостаточно подтверждённых данных для уверенного ответа по RuntimeManager. +- **plba-v2-architecture-control-plane** + Query: Какие компоненты участвуют в ControlPlaneService? + > \*\*ControlPlaneService\*\* является главным компонентом, управляющим жизненным циклом контролируемых каналов. Компоненты: \- \*\*ControlPlaneService\*\* \- \*\*ControlPlaneService.\_\_init\_\_\*\*: инициализирует сервис, регистрирует каналы и запускает асинхронные операции. \- \*\*ControlPlaneService.start\*\*: начинает работу сервиса, вызывая asyncio.run и читая атрибут \_channels. \- \*\*ControlPlaneService.register\_channel\*\*: регистрирует канал, читая атрибут \_channels. \- \*\*ControlPlaneService.stop\*\*, \*\*ControlPlaneService.\_stop\_async\*\*: останавливают сервисы. \- \*\*ControlPlaneService.\_start\_async\*\*: отвечает за асинхронный старт. \- \*\*ControlChannel\*\*: абстрактный базовый класс всех каналов контроля с методами start и stop. Связи между компонентами: \- Инициализация \(ControlPlaneService.\_\_init\_\_\) выполняет dataflow\_slice для методов регистрации и старта. \- Метод старта \(ControlPlaneService.s… +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Сущность 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-open-file-nonexistent.json b/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/full_chain_plba_last_case_plba-v2-open-file-nonexistent.json similarity index 65% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/full_chain_plba_last_case_plba-v2-open-file-nonexistent.json index bd7f711..8e5606b 100644 --- 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_last_case_v3/20260312_165845/full_chain_plba_last_case_plba-v2-open-file-nonexistent.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/tmp/full_chain_plba_last_case.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Открой файл src/app_runtime/core/missing_runtime.py", @@ -10,7 +10,7 @@ "graph_id": "CodeQAGraph", "conversation_mode": "START", "rag_count": 0, - "llm_answer": "Файл `src/app_runtime/core/missing_runtime.py` не найден.", + "llm_answer": "Файл src/app_runtime/core/missing_runtime.py не найден.", "answer_mode": "not_found", "path_scope": [ "src/app_runtime/core/missing_runtime.py" @@ -20,11 +20,8 @@ "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 не найден.'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Открой файл src/app_runtime/core/missing_runtime.py", "router_result": { @@ -269,7 +266,7 @@ "reason": null }, "retrieval_by_layer_ms": { - "C0_SOURCE_CHUNKS": 13 + "C0_SOURCE_CHUNKS": 147 } } }, @@ -281,6 +278,9 @@ ], "retrieval_sufficient": false, "answer_mode": "insufficient", + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "answer_policy_branch": "open_file_not_found", + "decision_reason": "path_scope_empty", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -325,17 +325,167 @@ ], "evidence_count": 0 }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + }, "failure_reasons": [ "path_scope_empty", "layer_c0_empty" ], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 148, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } }, "rag_rows": [], "validation": { "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 148 + }, + "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": 147 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "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.", + "evidence_count": 0 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "path_scope_empty", + "answer_policy_branch": "open_file_not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/full_chain_plba_last_case_plba-v2-open-file-nonexistent.md b/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/full_chain_plba_last_case_plba-v2-open-file-nonexistent.md new file mode 100644 index 0000000..8ba35f3 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/full_chain_plba_last_case_plba-v2-open-file-nonexistent.md @@ -0,0 +1,245 @@ +# plba-v2-open-file-nonexistent + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/tmp/full_chain_plba_last_case.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": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "OPEN_FILE", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 148 + }, + "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": 147 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "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.", + "evidence_count": 0 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "path_scope_empty", + "answer_policy_branch": "open_file_not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": false, + "layers_used": [ + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "answer_policy_branch": "open_file_not_found", + "decision_reason": "path_scope_empty", + "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 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/core/missing_runtime.py", + "sub_intent": "OPEN_FILE", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_requested", + "path_scope": [ + "src/app_runtime/core/missing_runtime.py" + ] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": "src/app_runtime/core/missing_runtime.py" + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "path_scope_empty", + "layer_c0_empty" + ], + "timings_ms": { + "router": 1, + "retrieval": 148, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/summary.md b/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/summary.md new file mode 100644 index 0000000..255e59d --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_last_case_v3/20260312_165845/summary.md @@ -0,0 +1,12 @@ +# pipeline_setup_v3 summary + +Passed: 1/1 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass | +|------|------|------|-------|-------------------|------------|------| +| full_chain_plba_last_case.yaml | plba-v2-open-file-nonexistent | full_chain | Открой файл src/app_runtime/core/missing_runtime.py | OPEN_FILE | — | ✓ | + +## LLM Answers +- **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_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-explain-nonexistent-symbol.json b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-explain-nonexistent-symbol.json new file mode 100644 index 0000000..fd8447b --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-explain-nonexistent-symbol.json @@ -0,0 +1,632 @@ +{ + "case_id": "plba-v2-explain-nonexistent-symbol", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.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": "Сущность RuntimeFactoryManager не найдена в доступном коде.", + "answer_mode": "not_found", + "path_scope": [], + "symbol_candidates": [ + "RuntimeFactoryManager" + ], + "layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ] + }, + "passed": true, + "mismatches": [], + "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": "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": "Объясни класс 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": "not_found", + "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": 32, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 13 + } + } + }, + "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", + "resolved_target": null, + "answer_policy_branch": "explain_not_found", + "decision_reason": "symbol_resolution_not_found", + "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_found" + }, + "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 + }, + "evidence_gate_input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "insufficient_evidence" + ], + "timings_ms": { + "router": 2, + "retrieval": 145, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 + } + }, + "rag_rows": [], + "validation": { + "passed": true, + "action": "return", + "reasons": [] + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 2 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "EXPLAIN", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 145 + }, + "output": { + "rag_count": 33, + "answer_path_rag_count": 0, + "resolved_symbol_status": "not_found", + "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": 32, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 13 + } + } + }, + { + "step": "pre_evidence_gate", + "status": "blocked", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met).", + "evidence_count": 0 + } + }, + { + "step": "llm", + "status": "skipped", + "timings_ms": { + "llm": 1 + }, + "output": { + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "symbol_resolution_not_found", + "answer_policy_branch": "explain_not_found" + } + }, + { + "step": "post_evidence_gate", + "status": "skipped", + "timings_ms": { + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "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-runtime-manager.md b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-explain-nonexistent-symbol.md similarity index 52% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-explain-nonexistent-symbol.md index 29eda0e..8b724d9 100644 --- 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_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-explain-nonexistent-symbol.md @@ -1,12 +1,12 @@ -# plba-v2-explain-runtime-manager +# 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 +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.yaml - runner: agent_runtime - mode: full_chain - passed: True ## Query -Объясни как работает класс RuntimeManager +Объясни класс RuntimeFactoryManager ## Actual { @@ -14,12 +14,12 @@ "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", + "rag_count": 0, + "llm_answer": "Сущность RuntimeFactoryManager не найдена в доступном коде.", + "answer_mode": "not_found", "path_scope": [], "symbol_candidates": [ - "RuntimeManager" + "RuntimeFactoryManager" ], "layers": [ "C1_SYMBOL_CATALOG", @@ -36,7 +36,7 @@ "step": "router", "status": "completed", "timings_ms": { - "router": 0 + "router": 2 }, "output": { "intent": "CODE_QA", @@ -49,13 +49,13 @@ "step": "retrieval", "status": "completed", "timings_ms": { - "retrieval": 194 + "retrieval": 145 }, "output": { "rag_count": 33, - "answer_path_rag_count": 33, - "resolved_symbol_status": "resolved", - "resolved_symbol": "RuntimeManager", + "answer_path_rag_count": 0, + "resolved_symbol_status": "not_found", + "resolved_symbol": null, "requested_layers": [ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", @@ -108,48 +108,67 @@ "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 + "C1_SYMBOL_CATALOG": 32, + "C0_SOURCE_CHUNKS": 22, + "C4_SEMANTIC_ROLES": 18, + "C2_DEPENDENCY_GRAPH": 58, + "C3_ENTRYPOINTS": 13 } } }, { "step": "pre_evidence_gate", - "status": "passed", + "status": "blocked", "timings_ms": { - "pre_evidence_gate": 0 + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] }, "output": { - "passed": true, - "failure_reasons": [], - "degraded_message": "" + "passed": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "degraded_message": "Insufficient evidence for a confident answer. Evidence count: 0 (minimum required not met).", + "evidence_count": 0 } }, { "step": "llm", - "status": "completed", + "status": "skipped", "timings_ms": { - "llm": 1244 + "llm": 1 }, "output": { - "prompt_name": "code_qa_explain_answer", - "answer_preview": "Класс `RuntimeManager` находится в файле `src/app_runtime/core/runtime.py`. Конкретной реализации инициализации или подробного описания методов в предоставленном контексте не видно. Однако исходя из имеющихся признаков:\n\n1. Класс имеет ответственность за управление состоянием и конфигурацией runtime" + "reason": "policy_short_circuit", + "answer_mode": "not_found", + "decision_reason": "symbol_resolution_not_found", + "answer_policy_branch": "explain_not_found" } }, { "step": "post_evidence_gate", - "status": "passed", + "status": "skipped", "timings_ms": { - "post_evidence_gate": 0, - "repair": 0 + "post_evidence_gate": 1 + }, + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null }, "output": { - "passed": true, - "reasons": [], - "repair_used": false + "reason": "no_draft_answer" } } ] @@ -157,7 +176,7 @@ ## Diagnostics { "intent_correct": null, - "target_found": true, + "target_found": false, "layers_used": [ "C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", @@ -165,8 +184,11 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "retrieval_sufficient": true, - "answer_mode": "normal", + "retrieval_sufficient": false, + "answer_mode": "insufficient", + "resolved_target": null, + "answer_policy_branch": "explain_not_found", + "decision_reason": "symbol_resolution_not_found", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -181,11 +203,11 @@ "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS" ], - "symbol_resolution_status": "resolved" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", - "query": "Объясни как работает класс RuntimeManager", + "query": "Объясни класс RuntimeFactoryManager", "sub_intent": "EXPLAIN", "path_scope": [], "requested_layers": [ @@ -199,47 +221,79 @@ "per_layer_outcome": [ { "layer_id": "C1_SYMBOL_CATALOG", - "hit_count": 8, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 8, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C4_SEMANTIC_ROLES", - "hit_count": 8, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C2_DEPENDENCY_GRAPH", - "hit_count": 6, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false }, { "layer_id": "C3_ENTRYPOINTS", - "hit_count": 3, - "empty": false, + "hit_count": 0, + "empty": true, "fallback_used": false } ], - "empty_layers": [], + "empty_layers": [ + "C1_SYMBOL_CATALOG", + "C0_SOURCE_CHUNKS", + "C4_SEMANTIC_ROLES", + "C2_DEPENDENCY_GRAPH", + "C3_ENTRYPOINTS" + ], "evidence_gate_decision": { - "sufficient": true, - "failure_reasons": [], - "evidence_count": 33 + "sufficient": false, + "failure_reasons": [ + "insufficient_evidence" + ], + "evidence_count": 0 }, - "failure_reasons": [], + "evidence_gate_input": { + "resolved_target": null, + "sub_intent": "EXPLAIN", + "target_type": "none", + "evidence_count": 0, + "code_chunk_count": 0, + "entrypoint_count": 0, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "not_found", + "draft_present": false, + "resolved_target": null + }, + "output": { + "reason": "no_draft_answer" + } + }, + "failure_reasons": [ + "insufficient_evidence" + ], "timings_ms": { - "router": 0, - "retrieval": 194, - "pre_evidence_gate": 0, - "llm": 1244 + "router": 2, + "retrieval": 145, + "pre_evidence_gate": 1, + "post_evidence_gate": 1 } } 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_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-find-entrypoints-health-endpoint.json similarity index 74% rename from 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 rename to tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-find-entrypoints-health-endpoint.json index e4ae87b..830f94b 100644 --- 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_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-find-entrypoints-health-endpoint.json @@ -1,6 +1,6 @@ { "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", + "source_file": "/Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.yaml", "runner": "agent_runtime", "mode": "full_chain", "query": "Где health endpoint?", @@ -9,8 +9,8 @@ "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)", + "rag_count": 10, + "llm_answer": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", "answer_mode": "answered", "path_scope": [], "symbol_candidates": [ @@ -22,10 +22,8 @@ "C0_SOURCE_CHUNKS" ] }, - "passed": false, - "mismatches": [ - "llm: expected answer to contain 'GET /health'" - ], + "passed": true, + "mismatches": [], "details": { "query": "Где health endpoint?", "router_result": { @@ -122,12 +120,9 @@ } }, "symbol_resolution": { - "status": "pending", + "status": "not_found", "resolved_symbol": null, - "alternatives": [ - "health", - "endpoint" - ], + "alternatives": [], "confidence": 0.0 }, "evidence_policy": { @@ -491,28 +486,22 @@ "last_modified": null, "staleness_score": null } - } - ], - "relations": [], - "entrypoints": [ + }, { + "layer": "C0_SOURCE_CHUNKS", "path": "src/app_runtime/control/http_app.py", - "title": "app.post", + "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": { - "entry_id": "56ed4b3229229e985cbf949d567b742b156412c7280eba9b5b54668f61bf0305", - "entry_type": "http", - "framework": "fastapi", - "route_or_command": "app.post", - "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "chunk_index": 0, + "chunk_type": "symbol_block", + "module_or_unit": "src.app_runtime.control.http_app", "is_test": false, - "lang_payload": { - "methods": [ - "POST" - ] - }, - "artifact_type": null, "blob_sha": "1cebc374b1999638635b2f2c2ccf1dcf11c465914c22dd9490b1531278846919", "repo_id": "plba", + "artifact_type": null, "section": null, "doc_id": null, "doc_version": null, @@ -521,10 +510,20 @@ "last_modified": null, "staleness_score": null } - }, + } + ], + "relations": [], + "entrypoints": [ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 31, + "end_line": 34, + "http_method": "GET", + "route_path": "/health", + "handler_symbol": "health", + "handler_symbol_id": "ab49f8d604dfed17bd83972a4158047a7c773c20ff58fbabc7963f4a1ec96834", + "route_or_command": "app.get", "metadata": { "entry_id": "5377b9336800b5d63cc3b67a58730d18a409b245650dd9449325d87c64e24f62", "entry_type": "http", @@ -552,6 +551,13 @@ { "path": "src/app_runtime/control/http_app.py", "title": "app.get", + "start_line": 38, + "end_line": 42, + "http_method": "GET", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "app.get", "metadata": { "entry_id": "06e2f03cced7c1146b2d29f81951f2a2839140484eae22b2d6a63075d903ca4a", "entry_type": "http", @@ -575,6 +581,40 @@ "last_modified": null, "staleness_score": null } + }, + { + "path": "src/app_runtime/control/http_app.py", + "title": "app.post", + "start_line": 38, + "end_line": 42, + "http_method": "POST", + "route_path": "/actions/{action}", + "handler_symbol": "action", + "handler_symbol_id": "4da634384f08efb2d4cc12ac58ce1e667a780481392b4e715ae963e8e8a37fab", + "route_or_command": "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 + } } ], "test_candidates": [], @@ -587,7 +627,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -884,6 +924,36 @@ "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 + } } ], "retrieval_report": { @@ -893,18 +963,20 @@ ], "retrieval_mode_by_layer": { "C3_ENTRYPOINTS": "vector", - "C0_SOURCE_CHUNKS": "vector" + "C0_SOURCE_CHUNKS": "exact_path_fetch" }, "top_k_by_layer": { "C3_ENTRYPOINTS": 12, - "C0_SOURCE_CHUNKS": 6 + "C0_SOURCE_CHUNKS": 24 }, "filters_by_layer": { "C3_ENTRYPOINTS": { "path_scope": [] }, "C0_SOURCE_CHUNKS": { - "path_scope": [] + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] } }, "fallback": { @@ -912,9 +984,16 @@ "reason": null }, "retrieval_by_layer_ms": { - "C3_ENTRYPOINTS": 32, - "C0_SOURCE_CHUNKS": 19 - } + "C3_ENTRYPOINTS": 240, + "C0_SOURCE_CHUNKS": 9 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] } }, "diagnostics": { @@ -926,6 +1005,9 @@ ], "retrieval_sufficient": true, "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", "router_result": { "intent": "CODE_QA", "graph_id": "CodeQAGraph", @@ -937,7 +1019,7 @@ "C3_ENTRYPOINTS", "C0_SOURCE_CHUNKS" ], - "symbol_resolution_status": "pending" + "symbol_resolution_status": "not_found" }, "retrieval_request": { "rag_session_id": "7d11da21-faa0-4cea-aede-aeabe069164c", @@ -958,7 +1040,7 @@ }, { "layer_id": "C0_SOURCE_CHUNKS", - "hit_count": 6, + "hit_count": 7, "empty": false, "fallback_used": false } @@ -967,10 +1049,44 @@ "evidence_gate_decision": { "sufficient": true, "failure_reasons": [], - "evidence_count": 9 + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)" + } }, "failure_reasons": [], - "timings_ms": {} + "timings_ms": { + "router": 1, + "retrieval": 254, + "pre_evidence_gate": 1, + "llm": 3666, + "post_evidence_gate": 1 + } }, "rag_rows": [ { @@ -1263,12 +1379,175 @@ "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 + } } ], "validation": { "passed": true, "action": "return", "reasons": [] - } + }, + "steps": [ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 254 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 240, + "C0_SOURCE_CHUNKS": 9 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3666 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)" + } + } + ] } } \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-find-entrypoints-health-endpoint.md b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-find-entrypoints-health-endpoint.md new file mode 100644 index 0000000..252b167 --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/full_chain_plba_quality_focus_plba-v2-find-entrypoints-health-endpoint.md @@ -0,0 +1,261 @@ +# plba-v2-find-entrypoints-health-endpoint + +- source_file: /Users/alex/Dev_projects_v2/ai driven app process/v2/agent/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.yaml +- runner: agent_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": 10, + "llm_answer": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "answer_mode": "answered", + "path_scope": [], + "symbol_candidates": [ + "health", + "endpoint" + ], + "layers": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ] +} + +## Steps +[ + { + "step": "router", + "status": "completed", + "timings_ms": { + "router": 1 + }, + "output": { + "intent": "CODE_QA", + "sub_intent": "FIND_ENTRYPOINTS", + "graph_id": "CodeQAGraph", + "conversation_mode": "START" + } + }, + { + "step": "retrieval", + "status": "completed", + "timings_ms": { + "retrieval": 254 + }, + "output": { + "rag_count": 10, + "answer_path_rag_count": 10, + "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": "exact_path_fetch" + }, + "top_k_by_layer": { + "C3_ENTRYPOINTS": 12, + "C0_SOURCE_CHUNKS": 24 + }, + "filters_by_layer": { + "C3_ENTRYPOINTS": { + "path_scope": [] + }, + "C0_SOURCE_CHUNKS": { + "path_scope": [ + "src/app_runtime/control/http_app.py" + ] + } + }, + "fallback": { + "used": false, + "reason": null + }, + "retrieval_by_layer_ms": { + "C3_ENTRYPOINTS": 240, + "C0_SOURCE_CHUNKS": 9 + }, + "supplemental_requests": [ + { + "layer": "C0_SOURCE_CHUNKS", + "query": "Где health endpoint?", + "ranking_profile": "entrypoint_source_hydration" + } + ] + } + }, + { + "step": "pre_evidence_gate", + "status": "passed", + "timings_ms": { + "pre_evidence_gate": 1 + }, + "input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "output": { + "passed": true, + "failure_reasons": [], + "degraded_message": "", + "evidence_count": 10 + } + }, + { + "step": "llm", + "status": "completed", + "timings_ms": { + "llm": 3666 + }, + "output": { + "prompt_name": "code_qa_find_entrypoints_answer", + "answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient" + } + }, + { + "step": "post_evidence_gate", + "status": "passed", + "timings_ms": { + "post_evidence_gate": 1, + "post_evidence_gate_recheck": 0, + "repair": 0 + }, + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)" + } + } +] + +## Diagnostics +{ + "intent_correct": null, + "target_found": true, + "layers_used": [ + "C3_ENTRYPOINTS", + "C0_SOURCE_CHUNKS" + ], + "retrieval_sufficient": true, + "answer_mode": "normal", + "resolved_target": "src/app_runtime/control/http_app.py", + "answer_policy_branch": "normal_answer", + "decision_reason": "evidence_sufficient", + "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": 7, + "empty": false, + "fallback_used": false + } + ], + "empty_layers": [], + "evidence_gate_decision": { + "sufficient": true, + "failure_reasons": [], + "evidence_count": 10 + }, + "evidence_gate_input": { + "resolved_target": "src/app_runtime/control/http_app.py", + "sub_intent": "FIND_ENTRYPOINTS", + "target_type": "file", + "evidence_count": 10, + "code_chunk_count": 10, + "entrypoint_count": 3, + "relation_count": 0, + "test_evidence_count": 0, + "symbol_resolution_status": "not_found", + "path_scope": [] + }, + "post_evidence_gate": { + "input": { + "answer_mode": "normal", + "degraded_message": "", + "resolved_target": "src/app_runtime/control/http_app.py", + "draft_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)", + "repair_candidate": true + }, + "output": { + "passed": true, + "action": "return", + "reasons": [], + "repair_used": false, + "final_answer_preview": "Конкретная точка health endpoint подтверждена:\n\n- GET /health (объявлен в src/app_runtime/control/http_app.py:31-34)\n\nДругие endpoints найдены, но не являются точками health:\n\n- POST /actions/{action}\n- GET /actions/{action} (эти маршруты объявлены там же, но не отмечены как health check)" + } + }, + "failure_reasons": [], + "timings_ms": { + "router": 1, + "retrieval": 254, + "pre_evidence_gate": 1, + "llm": 3666, + "post_evidence_gate": 1 + } +} + +## Mismatches +- none \ No newline at end of file diff --git a/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/summary.md b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/summary.md new file mode 100644 index 0000000..b4a62cb --- /dev/null +++ b/tests/pipeline_setup_v3/test_results/plba_quality_focus_v3/20260312_173122/summary.md @@ -0,0 +1,16 @@ +# pipeline_setup_v3 summary + +Passed: 2/2 + +| File | Case | Mode | Query | Actual sub-intent | RAG layers | Pass | +|------|------|------|-------|-------------------|------------|------| +| full_chain_plba_quality_focus.yaml | plba-v2-find-entrypoints-health-endpoint | full_chain | Где health endpoint? | FIND_ENTRYPOINTS | C0_SOURCE_CHUNKS:7, C3_ENTRYPOINTS:3 | ✓ | +| full_chain_plba_quality_focus.yaml | plba-v2-explain-nonexistent-symbol | full_chain | Объясни класс RuntimeFactoryManager | EXPLAIN | — | ✓ | + +## LLM Answers +- **plba-v2-find-entrypoints-health-endpoint** + Query: Где health endpoint? + > Конкретная точка health endpoint подтверждена: \- GET /health \(объявлен в src/app\_runtime/control/http\_app.py:31\-34\) Другие endpoints найдены, но не являются точками health: \- POST /actions/\{action\} \- GET /actions/\{action\} \(эти маршруты объявлены там же, но не отмечены как health check\) +- **plba-v2-explain-nonexistent-symbol** + Query: Объясни класс RuntimeFactoryManager + > Сущность RuntimeFactoryManager не найдена в доступном коде. \ No newline at end of file diff --git a/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.yaml b/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.yaml new file mode 100644 index 0000000..c56bd17 --- /dev/null +++ b/tests/pipeline_setup_v3/tmp/full_chain_plba_quality_focus.yaml @@ -0,0 +1,36 @@ +defaults: + runner: runtime + mode: full_chain + input: + rag_session_id: "7d11da21-faa0-4cea-aede-aeabe069164c" + +cases: + - 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: ["не обнаружено"] + + - id: plba-v2-explain-nonexistent-symbol + query: "Объясни класс RuntimeFactoryManager" + expected: + router: + intent: CODE_QA + sub_intent: EXPLAIN + graph_id: CodeQAGraph + conversation_mode: START + retrieval: + layers_include: ["C1_SYMBOL_CATALOG", "C0_SOURCE_CHUNKS", "C2_DEPENDENCY_GRAPH", "C3_ENTRYPOINTS", "C4_SEMANTIC_ROLES"] + llm: + non_empty: true + contains_all: ["не найдена"]