ARCH: восстановить годовое покрытие MCP discovery помесячными пробами

This commit is contained in:
2026-04-21 08:41:35 +03:00
parent 4baa54fe81
commit cd3315e06d
15 changed files with 834 additions and 94 deletions
@@ -1304,6 +1304,47 @@ Module progress:
- Big Block 5 MCP Semantic Data Agent: `100%`.
## Progress Update - 2026-04-21 MCP Discovery Yearly Coverage Recovery Through Monthly Probes
The twentieth implementation slice of Big Block 5 closes the first yearly-coverage proof gap that remained inside guarded MCP discovery value-flow answers.
Before this slice the assistant could already:
- answer incoming counterparty turnover totals through guarded MCP discovery;
- answer outgoing supplier payout totals through guarded MCP discovery;
- compose bidirectional net totals and month-by-month net lines from the same evidence.
But the broad yearly value-flow probe still stopped at the first MCP row limit. For dense 2020 counterparty activity this meant the assistant answered honestly, yet underpowered: user-facing text still said the outgoing side hit `100 из 100`, even though the missing coverage was recoverable through bounded subperiod probes rather than impossible.
New behavior:
- the discovery planner now grants a larger but still bounded probe budget for explicit yearly value-flow and monthly-aggregation questions;
- the pilot executor first runs the broad yearly value-flow probe and, only when that broad probe hits the row limit on an explicit year window, automatically recovers coverage through month-by-month 1C subprobes;
- recovered subperiod rows are stitched into one coverage-aware result instead of being exposed as separate runtime fragments;
- guarded answer drafting keeps the answer honest: it no longer claims a partial year when monthly recovery fully proves the requested period, but it still states the derivation basis and keeps "outside the checked period is not proven" boundaries intact.
Replay result:
- `address_truth_harness_phase19_mcp_discovery_response_gate_live_rerun14` passed `8/8`, final status `accepted`;
- the supplier payout step now answers the 2020 `Группа СВК` question with `43 763 351,53 руб.`, based on `299 из 299` recovered rows from `2020-01-09` through `2020-12-25`;
- the bidirectional net step now answers with `47 628 853,03 руб.` received, `43 763 351,53 руб.` paid, and `3 865 501,50 руб.` net in our favor for the requested 2020 window;
- the monthly net step keeps the month-by-month shape from January through December 2020 and no longer inherits the old fake partiality caused by the first broad outgoing probe hitting the row cap;
- user-facing text explains that coverage was restored through monthly 1C checks after the broad probe hit the row limit, without leaking `planner_`, `pilot_`, `runtime_`, `query_documents`, or `query_movements`.
Validation:
- `npm test -- assistantMcpDiscoveryPolicy.test.ts assistantMcpDiscoveryPlanner.test.ts assistantMcpDiscoveryPilotExecutor.test.ts assistantMcpDiscoveryAnswerAdapter.test.ts assistantMcpDiscoveryResponseCandidate.test.ts assistantMcpDiscoveryResponsePolicy.test.ts assistantMcpDiscoveryRuntimeEntryPoint.test.ts assistantMcpDiscoveryRuntimeBridge.test.ts assistantAddressLaneResponseRuntimeAdapter.test.ts assistantDeepTurnResponseRuntimeAdapter.test.ts assistantLivingChatRuntimeAdapter.test.ts assistantAddressOrchestrationRuntimeAdapter.test.ts assistantDebugPayloadAssembler.test.ts` passed `91/91`;
- `npm run build` passed;
- `python scripts/domain_truth_harness.py run-live --spec docs/orchestration/address_truth_harness_phase19_mcp_discovery_response_gate.json --output-dir artifacts/domain_runs/address_truth_harness_phase19_mcp_discovery_response_gate_live_rerun14 --timeout-seconds 240` passed `8/8`, final status `accepted`.
Known remaining boundary:
- this still does not make Qwen3 an unrestricted self-navigating 1C agent across arbitrary registers and schemas; richer follow-up drilldown over the recovered rows, broader self-navigation, and evidence-safe agentic exploration remain future work beyond this first completed guarded MCP semantic data block.
Module progress:
- Big Block 5 MCP Semantic Data Agent: `100%`.
## Execution Rule
Do not implement this plan as: