ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг этапов 2.85 - 2.88 - Убран последний as any из backend/src и довел тип debug до конца цепочки deep-turn
This commit is contained in:
@@ -1920,7 +1920,61 @@ Validation:
|
||||
- `assistantDeepTurnResponseAttemptRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnAttemptRuntimeAdapter.test.ts`
|
||||
|
||||
Status: **In progress (Phase 2.1 + 2.2 + 2.3 + 2.4 + 2.5 + 2.6 + 2.7 + 2.8 + 2.9 + 2.10 + 2.11 + 2.12 + 2.13 + 2.14 + 2.15 + 2.16 + 2.17 + 2.18 + 2.19 + 2.20 + 2.21 + 2.22 + 2.23 + 2.24 + 2.25 + 2.26 + 2.27 + 2.28 + 2.29 + 2.30 + 2.31 + 2.32 + 2.33 + 2.34 + 2.35 + 2.36 + 2.37 + 2.38 + 2.39 + 2.40 + 2.41 + 2.42 + 2.43 + 2.44 + 2.45 + 2.46 + 2.47 + 2.48 + 2.49 + 2.50 + 2.51 + 2.52 + 2.53 + 2.54 + 2.55 + 2.56 + 2.57 + 2.58 + 2.59 + 2.60 + 2.61 + 2.62 + 2.63 + 2.64 + 2.65 + 2.66 + 2.67 + 2.68 + 2.69 + 2.70 + 2.71 + 2.72 + 2.73 + 2.74 + 2.75 + 2.76 + 2.77 + 2.78 + 2.79 + 2.80 completed)**
|
||||
Implemented in current pass (Phase 2.81 + 2.82 + 2.83 + 2.84):
|
||||
1. Removed remaining unsafe casts from deep analysis-attempt input builder:
|
||||
- `assistantDeepTurnAnalysisAttemptInputBuilder.ts`
|
||||
- added typed adapters/normalizers for:
|
||||
- temporal/polarity/claim-bound resolver bridges;
|
||||
- focus-domain narrowing for guard pipeline;
|
||||
- company-anchor and primary-period normalization;
|
||||
- runtime callback mapping (`context -> plan -> retrieval -> guard -> grounding -> composition`) without `as any`.
|
||||
2. Hardened deep analysis runtime contracts:
|
||||
- `assistantDeepTurnAnalysisRuntimeAdapter.ts`
|
||||
- replaced broad unknown execution-plan/guard/grounding signatures with concrete typed contracts (`AssistantExecutionPlanItem`, guard and grounding slices).
|
||||
3. Hardened deep context contracts for guard chain compatibility:
|
||||
- `assistantDeepTurnContextRuntimeAdapter.ts`
|
||||
- aligned temporal/polarity/claim-bound outputs with concrete audits;
|
||||
- aligned `liveTemporalHint` with retrieval runtime contract.
|
||||
4. Removed remaining unsafe casts from grounding and composition runtime adapters:
|
||||
- `assistantDeepTurnGroundingRuntimeAdapter.ts`
|
||||
- `assistantDeepTurnCompositionRuntimeAdapter.ts`
|
||||
- replaced generic cast-based defaults with typed defaults and normalized company-anchor handoff into answer composer.
|
||||
|
||||
Validation:
|
||||
1. `npm run build` passed.
|
||||
2. Targeted deep analysis/grounding/composition pack passed:
|
||||
- `assistantDeepTurnAnalysisAttemptInputBuilder.test.ts`
|
||||
- `assistantDeepTurnAnalysisRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnAnalysisAttemptRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnGroundingRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnCompositionRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnAttemptRuntimeAdapter.test.ts`
|
||||
|
||||
Implemented in current pass (Phase 2.85 + 2.86 + 2.87 + 2.88):
|
||||
1. Removed the final `as any` from backend source deep-turn packaging path:
|
||||
- `assistantDeepTurnPackaging.ts`
|
||||
- switched assistant-item debug handoff to strongly typed payload contract.
|
||||
2. Hardened debug payload contract at assembly boundary:
|
||||
- `assistantDebugPayloadAssembler.ts`
|
||||
- `buildDeepAnalysisDebugPayload(...)` now returns `AssistantDebugPayload` contract.
|
||||
3. Propagated typed debug payload through deep-turn runtime chain:
|
||||
- `assistantDeepTurnPackagingRuntimeAdapter.ts`
|
||||
- `assistantDeepTurnResponseRuntimeAdapter.ts`
|
||||
- `assistantDeepTurnResponseAttemptRuntimeAdapter.ts`
|
||||
- `assistantDeepTurnAttemptRuntimeAdapter.ts`
|
||||
- aligned `debug` field contracts to `AssistantDebugPayload` and fixed generic runtime callback typing so `ResponseType` remains preserved end-to-end.
|
||||
4. Preserved behavior:
|
||||
- no runtime logic change; only contract tightening for debug payload propagation and generic signature alignment.
|
||||
|
||||
Validation:
|
||||
1. `npm run build` passed.
|
||||
2. Targeted deep packaging/response chain pack passed:
|
||||
- `assistantDeepTurnPackaging.test.ts`
|
||||
- `assistantDeepTurnPackagingRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnResponseAttemptRuntimeAdapter.test.ts`
|
||||
- `assistantDeepTurnAttemptRuntimeAdapter.test.ts`
|
||||
|
||||
Status: **In progress (Phase 2.1 + 2.2 + 2.3 + 2.4 + 2.5 + 2.6 + 2.7 + 2.8 + 2.9 + 2.10 + 2.11 + 2.12 + 2.13 + 2.14 + 2.15 + 2.16 + 2.17 + 2.18 + 2.19 + 2.20 + 2.21 + 2.22 + 2.23 + 2.24 + 2.25 + 2.26 + 2.27 + 2.28 + 2.29 + 2.30 + 2.31 + 2.32 + 2.33 + 2.34 + 2.35 + 2.36 + 2.37 + 2.38 + 2.39 + 2.40 + 2.41 + 2.42 + 2.43 + 2.44 + 2.45 + 2.46 + 2.47 + 2.48 + 2.49 + 2.50 + 2.51 + 2.52 + 2.53 + 2.54 + 2.55 + 2.56 + 2.57 + 2.58 + 2.59 + 2.60 + 2.61 + 2.62 + 2.63 + 2.64 + 2.65 + 2.66 + 2.67 + 2.68 + 2.69 + 2.70 + 2.71 + 2.72 + 2.73 + 2.74 + 2.75 + 2.76 + 2.77 + 2.78 + 2.79 + 2.80 + 2.81 + 2.82 + 2.83 + 2.84 + 2.85 + 2.86 + 2.87 + 2.88 completed)**
|
||||
|
||||
## Stage 3 (P2): Hybrid Semantic Layer (LLM + Deterministic Guards)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user