ARCH: замкнуть all-time continuity после metadata retrieval

This commit is contained in:
2026-04-23 14:23:04 +03:00
parent 4a6ac6bd99
commit 14465c7fde
6 changed files with 300 additions and 2 deletions
@@ -148,11 +148,20 @@ function explicitOrganizationScope(pilot) {
const normalized = value.trim();
return normalized.length > 0 ? normalized : null;
}
function hasAllTimeScope(pilot) {
return (dryRunHasAxis(pilot, "all_time_scope") ||
pilot.reason_codes.includes("mcp_discovery_all_time_scope_signal_detected") ||
pilot.dry_run.reason_codes.includes("mcp_discovery_all_time_scope_signal_detected"));
}
function documentOrMovementScopeRu(pilot) {
const entity = firstEntityCandidate(pilot);
const period = explicitDateScope(pilot);
const entityPart = entity ? ` по контрагенту ${entity}` : "";
const periodPart = period ? ` за ${period}` : " в проверенном окне";
const periodPart = period
? ` за ${period}`
: hasAllTimeScope(pilot)
? " за все доступное время"
: " в проверенном окне";
return `${entityPart}${periodPart}`;
}
function isMovementLaneClarification(pilot) {