ГЛОБАЛЬНЫЙ РЕФАКТОРИНГ АРХИТЕКТУРЫ - Рефакторинг этапов 2.692.72 и 2.732.76 - типобезопасность turn-runtime билдера и убрал остатки слабых кастов в маппинге зависимостей: assistantTurnRuntimeInputBuilder.ts / Поднял типы в deps-адаптере до контрактов AssistantTurnRuntimeBuilderDeps (sessions/normalizer/data-layer/query/chat/log), убрал unknown/any-обертки: assistantTurnRuntimeDepsAdapter.ts
This commit is contained in:
@@ -1850,7 +1850,47 @@ Validation:
|
||||
- `assistantWave10SettlementCorrectiveRegression.test.ts`
|
||||
- `assistantLivingChatMode.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 completed)**
|
||||
Implemented in current pass (Phase 2.69 + 2.70 + 2.71 + 2.72):
|
||||
1. Finalized strict deps typing in turn runtime input builder:
|
||||
- `assistantTurnRuntimeInputBuilder.ts`
|
||||
- completed generic `AssistantTurnRuntimeBuilderDeps<ResponseType>` wiring through address/deep runtime input contracts;
|
||||
- removed residual weak casts from builder field projection.
|
||||
2. Hardened turn runtime deps adapter contracts:
|
||||
- `assistantTurnRuntimeDepsAdapter.ts`
|
||||
- typed sessions/normalizer/data-layer/address-query/chat/log inputs directly from `AssistantTurnRuntimeBuilderDeps` contract slices;
|
||||
- removed `unknown`/`any` wrappers from adapter mapping while preserving compatible handler signatures for optional args.
|
||||
3. Preserved behavior of turn orchestration chain under stricter typing:
|
||||
- bootstrap -> address attempt -> deep attempt flow remains unchanged at runtime.
|
||||
|
||||
Validation:
|
||||
1. `npm run build` passed.
|
||||
2. Targeted turn/deps regression pack passed:
|
||||
- `assistantTurnRuntimeInputBuilder.test.ts`
|
||||
- `assistantTurnRuntimeDepsAdapter.test.ts`
|
||||
- `assistantTurnAttemptRuntimeAdapter.test.ts`
|
||||
- `assistantAddressAttemptRuntimeAdapter.test.ts`
|
||||
|
||||
Implemented in current pass (Phase 2.73 + 2.74 + 2.75 + 2.76):
|
||||
1. Removed remaining unsafe casts in address->living-chat bridge:
|
||||
- `assistantAddressAttemptRuntimeAdapter.ts`
|
||||
- replaced `mergeKnownOrganizations` dependency type with living-chat compatible contract;
|
||||
- removed `as any` cast for `mergeKnownOrganizations` and removed final object cast to `RunAssistantLivingChatAttemptRuntimeInput`.
|
||||
2. Added explicit mode-decision normalization before living-chat runtime handoff:
|
||||
- mapped untyped `modeDecision` to typed `{ mode: string | null; reason: string | null }` contract.
|
||||
3. Preserved behavior of address lane + living-chat fallback under stricter typing:
|
||||
- runtime flow unchanged, only contract hardening.
|
||||
|
||||
Validation:
|
||||
1. `npm run build` passed.
|
||||
2. Targeted address/living/turn regression pack passed:
|
||||
- `assistantAddressAttemptRuntimeAdapter.test.ts`
|
||||
- `assistantLivingChatAttemptRuntimeAdapter.test.ts`
|
||||
- `assistantLivingChatHandlerRuntimeAdapter.test.ts`
|
||||
- `assistantTurnRuntimeInputBuilder.test.ts`
|
||||
- `assistantTurnRuntimeDepsAdapter.test.ts`
|
||||
- `assistantTurnAttemptRuntimeAdapter.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 completed)**
|
||||
|
||||
## Stage 3 (P2): Hybrid Semantic Layer (LLM + Deterministic Guards)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user