I /think/ the story did finish, with the caliph dealt with and everyone
else back where they belonged.
Are you asking what the idea behind the whole story was, or what the
point of Dru entering the program here was? (I certainly can't answer
the latter - the former just seemed an odd (and drawn out and more than
a little disjointed and unsatisfying) re-imagining of Scheherezade.