Planner Autonomy: связать inventory templates с exact runtime

This commit is contained in:
2026-05-01 13:31:41 +03:00
parent 3f7caae668
commit a4db26a76e
7 changed files with 975 additions and 57 deletions
@@ -87,9 +87,16 @@ The following consolidation step promoted the accepted inventory-stock breadth b
These templates are now first-class catalog chain descriptors and can be selected by the data-need graph/planner. They reuse reviewed generic primitives (`query_movements`, `query_documents`, `aggregate_by_axis`, `drilldown_related_objects`, `probe_coverage`, `explain_evidence_basis`) and add inventory-specific axes such as `as_of_date`, `warehouse`, `supplier`, `buyer`, `quantity`, and `evidence_basis`.
The live MCP pilot intentionally marks these new inventory templates as `inventory_route_template_v1` / unsupported for live generic pilot execution until the exact inventory runtime paths are explicitly bridged into the bounded MCP executor. This keeps the architecture honest: route fabric exists, but runtime execution is still gated by the existing exact inventory capabilities and future bridging work.
The first runtime bridge for these inventory templates now delegates through existing exact inventory recipes instead of inventing a new generic inventory executor:
The runtime answer boundary now makes that distinction explicit for inventory templates:
- `inventory_stock_snapshot` -> `inventory_on_hand_as_of_date`
- `inventory_supplier_overlap` -> `inventory_supplier_stock_overlap_as_of_date`
- `inventory_purchase_provenance` -> `inventory_purchase_provenance_for_item`
- `inventory_sale_trace` -> `inventory_sale_trace_for_item`
The bridge keeps the reviewed MCP route fabric as the planner surface, but uses `addressRecipeCatalog` exact queries and account scope `41.01` as the evidence source. Root inventory templates execute through `query_movements`; selected-item provenance/sale templates execute through `query_documents`. Missing selected-item anchors remain clarification, not a guessed item.
The runtime answer boundary still makes unsupported or unconfirmed inventory states explicit:
- unsupported inventory route templates get a user-facing "template selected, live execution not yet bridged" answer instead of a generic checked-sources fallback;
- `must_not_claim` forbids presenting inventory planning as executed stock, supplier, purchase, or sale evidence;
@@ -152,13 +159,20 @@ Latest validation after the inventory runtime-boundary hardening:
- `npm.cmd run build`: passed
- graphify rebuild: `5913 nodes`, `12837 edges`, `138 communities`
Latest validation after the inventory exact-runtime bridge:
- targeted runtime-bridge/answer-adapter/pilot-executor tests: passed, `70 passed`, `1 skipped`
- full MCP-discovery suite: passed, `279 passed`, `9 skipped`
- `npm.cmd run build`: passed
- graphify rebuild: `5930 nodes`, `12884 edges`, `135 communities`
## Next Step
The next safe step is to continue from catalog-instantiated inventory templates into runtime bridging and broader reviewed scoring.
The next safe step is to validate the inventory exact-runtime bridge with live replay and then continue into broader reviewed scoring.
Recommended order:
1. bridge inventory catalog templates into the bounded MCP executor only where exact inventory runtime evidence can be reused safely;
1. rerun the inventory canary and a mixed cross-stage canary against live 1C/MCP once the proxy is available;
2. broaden catalog scoring beyond explicit document/movement lane choice into unfamiliar 1C asks;
3. grow primitive descriptors only where live replay shows a real evidence gap;
4. keep phase19, phase21, phase22, value-flow, metadata ambiguity, and inventory-stock canaries as regression gates.
@@ -76,8 +76,9 @@ It now documents a turnaround that is already operational in code, already mater
- lifecycle now behaves as a bounded activity-window inference chain with an explicit legal-fact boundary instead of an unqualified age answer;
- current-turn value-flow aggregate questions can override narrower supported exact routes when the user asks for totals/net/payment amounts;
- broad business evaluation remains in the deterministic living-chat bridge instead of being displaced by generic metadata discovery;
- inventory stock snapshot, supplier overlap, purchase provenance, and sale trace are now reviewed catalog chain templates, while live generic MCP pilot execution remains explicitly gated until the exact inventory runtime evidence is bridged safely;
- inventory stock snapshot, supplier overlap, purchase provenance, and sale trace are now reviewed catalog chain templates; generic free-form inventory execution remains forbidden, and evidence must pass through reviewed exact recipe bridges;
- runtime bridge and answer adapter now keep unsupported inventory route templates behind an explicit user-facing boundary instead of letting template planning look like confirmed stock/supplier/purchase/sale evidence;
- inventory catalog templates now bridge through existing exact inventory recipes (`41.01` scoped stock, supplier overlap, purchase provenance, and sale trace) inside the bounded MCP discovery pilot, while missing selected-item anchors still clarify instead of guessing;
- live map sync: [20 - planner_autonomy_consolidation_2026-05-01.md](./20%20-%20planner_autonomy_consolidation_2026-05-01.md)
Current honest status:
@@ -89,8 +90,8 @@ Current honest status:
- open-world bounded-autonomy readiness: `~85%`
- Post-F semantic integrity module progress: `~99%` operationally closed, with remaining risk now treated as next-slice discovery rather than an open blocker inside the closed slice
- active inventory-stock breadth slice progress: `100%` for the declared scenario pack, not for arbitrary inventory questions
- Planner Autonomy Consolidation progress: `~70%` for the declared module, with catalog-fabric, value-flow arbitration, lifecycle bounded inference, broad-evaluation bridge, inventory catalog templates, and inventory runtime-boundary honesty validated, but live inventory-template bridging and broader unfamiliar 1C asks still pending
- graph snapshot after latest rebuild: `5913 nodes`, `12837 edges`, `138 communities`
- Planner Autonomy Consolidation progress: `~74%` for the declared module, with catalog-fabric, value-flow arbitration, lifecycle bounded inference, broad-evaluation bridge, inventory catalog templates, inventory runtime-boundary honesty, and exact inventory recipe bridging validated locally, but live replay for the new bridge and broader unfamiliar 1C asks still pending
- graph snapshot after latest rebuild: `5930 nodes`, `12884 edges`, `135 communities`
- current breakpoint:
- the validated hot paths are no longer structurally broken;
- flagship continuity collapse is no longer the primary risk;
@@ -132,6 +133,7 @@ Latest live proof now includes:
- latest local Planner Autonomy slice accepted: full MCP-discovery suite passed `268/268` with `9` skipped; broad MCP/living-chat/route/meaning slice passed `305/305` with `9` skipped; build passed
- inventory template lift accepted locally: catalog/data-need/planner/turn-input slice passed `139/139` with `6` skipped; full MCP-discovery slice passed `276/276` with `9` skipped; build passed; graphify stayed at `5912 nodes`, `12833 edges`, `138 communities`
- inventory runtime-boundary hardening accepted locally: runtime-bridge/answer-adapter/pilot-executor slice passed `68/68` with `1` skipped; full MCP-discovery slice passed `277/277` with `9` skipped; build passed; graphify rebuilt to `5913 nodes`, `12837 edges`, `138 communities`
- inventory exact-runtime bridge accepted locally: runtime-bridge/answer-adapter/pilot-executor slice passed `70/70` with `1` skipped; full MCP-discovery slice passed `279/279` with `9` skipped; build passed; graphify rebuilt to `5930 nodes`, `12884 edges`, `135 communities`
Current architectural reading: