Архитектура: перенести base address tool gate из assistantService в assistantRoutePolicy и выровнять top-level orchestration owner

This commit is contained in:
2026-04-19 13:42:55 +03:00
parent d1ad8e2c1b
commit ac3757bc59
6 changed files with 329 additions and 279 deletions
@@ -466,6 +466,17 @@ Still open after the accepted phase12 replay:
- continuity now also owns `resolveFollowupTargetIntent(...)`, so `carryover target intent` precedence for purchase-date VAT bridge, selected-object retarget, root-context carryover, same-date pivot, displayed-entity retarget, and plain previous-intent fallback is expressed in one shared helper instead of an inline ternary tower;
- this matters because root-pivot semantics and target-intent precedence are among the heaviest remaining orchestration decisions in the follow-up path, and keeping them under one shared continuity layer reduces another chance that future domain expansion reintroduces drift between carryover state and target route selection;
- targeted `assistantContinuityPolicy` and `assistantTransitionPolicy` suites are green after the move, and a fresh live rerun of `address_truth_harness_phase12_wider_saved_session_pool` on `2026-04-19` is accepted `20/20`, which is the critical proof that the flagship mixed replay still survives after the decision-block extraction.
- the next top-level orchestration pass now removes one more heavy owner from `assistantService` and makes route arbitration more self-contained:
- the base `address tool gate` decision no longer lives as a service-local block in `assistantService` and is no longer injected into route arbitration as an external callback-only source of truth;
- `assistantRoutePolicy` now owns the default `resolveBaseAddressToolGateDecision(...)` path itself, including:
- meta/capability skip logic;
- classifier/intent/LLM-canonical exact-route signals;
- lexical/address-data fallback signals;
- unsupported predecompose semantic guard;
- `followup_context_detected` fallback when no direct message signal exists;
- this matters because the top-level `run address lane vs keep chat` gate is now structurally closer to the same route-policy owner that already arbitrates memory/meta/follow-up/deep transitions, instead of remaining split across `assistantService` glue and route policy heuristics;
- the route policy still accepts an override in tests, so regression coverage remains narrow and controllable, but the production runtime no longer depends on a duplicate service-local decision block;
- targeted `assistantRoutePolicy`, `assistantContinuityPolicy`, and `assistantTransitionPolicy` suites are green after the move, and a fresh live rerun of `address_truth_harness_phase12_wider_saved_session_pool` on `2026-04-19` remains accepted `20/20`, which is the proof that the flagship mixed path survives after lifting the gate out of `assistantService`.
## Next Execution Slice (2026-04-18)