PS as a separate/alternate exercise, perhaps you'd like to document the idealised version of this feature - you can change how it works if it makes the docs shorter and clearer - and if it's not too costly I could try to implement that. An experiment in doc-driven development.