Архитектура: централизовать inventory root-frame state и root-scoped carryover в continuity policy

This commit is contained in:
2026-04-19 09:25:22 +03:00
parent c9730c986a
commit 46dfef6fb6
9 changed files with 297 additions and 132 deletions
@@ -422,6 +422,12 @@ Still open after the accepted phase12 replay:
- targeted `assistantContinuityPolicy` and `assistantTransitionPolicy` suites are green after the move, including explicit regression coverage for `inventory_purchase_documents_for_item -> inventory_on_hand_as_of_date` carryover where `root_filters` must override a stale drilldown date;
- this pass reduces one more hidden state-reconstruction fork between the continuity layer and transition glue without introducing case-specific routing;
- a fresh live rerun of `address_truth_harness_phase12_wider_saved_session_pool` on `2026-04-19` stayed semantically clean on the repaired carryover path and failed only on the already-known time-unstable `today` expectations (`2026-04-18` vs `2026-04-19`) in `inventory_root_today`, `payables_today`, and `receivables_mirror_today`.
- the next continuity-authority pass now centralizes one more shared inventory root-frame seam that used to be split across `assistantService` and `assistantTransitionPolicy`:
- continuity now owns `hydrateInventoryRootFrameState(...)`, which fills missing organization/date scope into `inventoryRootFrame` and computes `currentFrameKind` from the same shared state object instead of rebuilding both pieces locally inside transition glue;
- continuity now also owns `buildRootScopedCarryoverFilters(...)`, so root-scoped filter precedence no longer lives as a separate service-local helper and tests no longer need a legacy re-export from `assistantService`;
- this matters because `inventoryRootFrame`, `current_frame_kind`, and `root-scoped` filter precedence now converge through one authority layer before `root_context_only` pivots are decided, which reduces another hidden chance for state drift when new domains or new follow-up families are added;
- targeted `assistantContinuityPolicy` and `assistantTransitionPolicy` suites are green after the move, with explicit coverage for root-frame hydration from navigation scope and for previous-date precedence over a stale inventory root frame;
- a fresh live rerun of `address_truth_harness_phase12_wider_saved_session_pool` on `2026-04-19` remained semantically stable on all repaired continuity paths and again failed only on the already-known date-sensitive `today` expectations, not on the new shared root-frame state owner.
## Next Execution Slice (2026-04-18)