Архитектура: стабилизировать organization authority после late company switch и закрыть phase16 multi-company replay

This commit is contained in:
2026-04-19 15:31:50 +03:00
parent 6e6f94b08c
commit af15e21bf6
25 changed files with 1063 additions and 36 deletions
@@ -499,6 +499,13 @@ Still open after the accepted phase12 replay:
- keeping that contract in one helper reduces another major chance that future domain expansion introduces contradictory exact-route vs deep-fallback precedence in nearby branches;
- targeted route/continuity/transition suites remain green after the move, including direct regression coverage that an exact VAT route must stay in the address lane even when only a semantic deep hint is present;
- 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 still survives after extracting the route-protection seam.
- the next replay-breadth and continuity-authority pass now closes a non-flagship late-switch seam that was still dangerous before multi-domain expansion:
- `assistantOrganizationScopeRuntimeAdapter` now prefers continuity-backed selected/active organization over stale address navigation scope after a late chat-side company switch, so a fresh company fixation in living-chat can no longer be silently overwritten by the previous address snapshot on the very next exact-data turn;
- `mergeFollowupContextWithOrganizationScopeRuntime(...)` now treats active session organization as the stronger authority over stale `previous_filters.organization` / `root_filters.organization`, which closes the last hot-path drift where follow-up carryover could rehydrate the old company even after the user had already switched contours;
- this matters because the system previously looked “almost fixed” on flagship chains while still failing a real multi-company late-pivot path: `Alternative Plus -> switch to RAYM in chat -> referential inventory/receivables follow-up -> switch back`;
- targeted `assistantOrganizationScopeRuntimeAdapter`, `assistantContinuityPolicy`, `assistantRoutePolicy`, and referential-organization regressions are green after the owner-precedence fix, and backend build stays green;
- the phase16 live replay `address_truth_harness_phase16_multicompany_late_pivot` is now accepted on `2026-04-19`, which is the first explicit proof that a non-flagship multi-company late switch keeps truthful company authority across both inventory and receivables exact routes in the same saved session;
- the same phase16 pass also hardened replay-gate honesty: its receivables step now accepts semantically equivalent honest empty-match phrasing (`31.03.2020` or `31 марта 2020`, `долг` / `долж`) instead of overfitting to one single first-line wording, so this pack is now a trustworthy breadth gate rather than a fragile phrasing oracle.
## Next Execution Slice (2026-04-18)