Архитектура: вынести address-vs-deep fallback arbitration в assistantRoutePolicy и уменьшить top-level decision pressure

This commit is contained in:
2026-04-19 13:53:18 +03:00
parent ac3757bc59
commit f3099a2c4b
3 changed files with 186 additions and 80 deletions
@@ -477,6 +477,15 @@ Still open after the accepted phase12 replay:
- 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`.
- the next route-arbitration pass now extracts one more dense decision tower from the top-level orchestration hot path:
- `assistantRoutePolicy` now owns `resolveAddressFallbackToDeepArbitration(...)`, so the four critical fallback verdicts are produced by one explicit helper instead of being recalculated as a scattered inline boolean block:
- `unsupported_address_intent_fallback_to_deep`
- `deep_analysis_signal_fallback_to_deep`
- `aggregate_analytics_signal_fallback_to_deep`
- `deep_session_continuation_fallback_to_deep`
- this matters because `address vs deep` arbitration is one of the last heavy control-plane seams in the project: it decides whether the assistant stays in exact-data mode or escalates into deep-analysis mode, and leaving that logic as a long inline branch makes future domain expansion much more likely to reintroduce contradictory fallback rules;
- the move does not change the route owner, but it makes the owner explicit and testable as one decision unit inside route policy rather than a fragile chain of local booleans;
- targeted route/continuity/transition suites remain 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 contour survives the extraction of the deep fallback arbitration seam.
## Next Execution Slice (2026-04-18)