ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Этап 4.5: добавлен аудит контракта Stage 4 в debug/log и закрыт расширенный quality-loop
This commit is contained in:
@@ -23,6 +23,7 @@ import type {
|
||||
GroundedAnswerEligibilityAudit,
|
||||
TemporalGuardAudit
|
||||
} from "./assistantRuntimeGuards";
|
||||
import { buildStage4AnswerContractAuditV1 } from "./assistantStage4AnswerContractAudit";
|
||||
|
||||
type RetrievalStatusItem = AssistantDebugPayload["retrieval_status"][number];
|
||||
|
||||
@@ -75,6 +76,7 @@ export interface DeepAnalysisDebugPayloadInput {
|
||||
outcomeClassV1: AssistantOutcomeClassV1;
|
||||
assistantOrchestrationContractsV1: AssistantContractsBundleV1["assistantOrchestrationContractsV1"];
|
||||
answerStructureV11: AnswerStructureV11 | null;
|
||||
assistantReply: string;
|
||||
investigationStateSnapshot: InvestigationStateWithProblemUnits | null;
|
||||
normalizedPayload: NormalizeResponsePayload["normalized"];
|
||||
}
|
||||
@@ -94,6 +96,7 @@ function toAnalysisContext(input: DeepAnalysisDebugPayloadInput["runtimeAnalysis
|
||||
|
||||
export function buildDeepAnalysisDebugPayload(input: DeepAnalysisDebugPayloadInput): AssistantDebugPayload {
|
||||
const analysisContext = toAnalysisContext(input.runtimeAnalysisContext);
|
||||
const answerContractStage4Audit = buildStage4AnswerContractAuditV1(input.assistantReply);
|
||||
return {
|
||||
trace_id: input.traceId,
|
||||
prompt_version: input.promptVersion,
|
||||
@@ -165,6 +168,7 @@ export function buildDeepAnalysisDebugPayload(input: DeepAnalysisDebugPayloadInp
|
||||
orchestration_contract_v1: input.addressRuntimeMetaForDeep?.orchestrationContract ?? null,
|
||||
assistant_outcome_class_v1: input.outcomeClassV1,
|
||||
assistant_orchestration_contracts_v1: input.assistantOrchestrationContractsV1,
|
||||
answer_contract_stage4_v1: answerContractStage4Audit,
|
||||
answer_structure_v11: input.answerStructureV11,
|
||||
investigation_state_snapshot: input.investigationStateSnapshot,
|
||||
normalized: input.normalizedPayload
|
||||
|
||||
Reference in New Issue
Block a user