In some experiments with pg_rewind and rep mgr I noticed that local testing is complicated by the fact that pg_rewind appears to copy configuration files from the source to target directory.
I would propose to make a modest patch to exclude postgresql.conf, pg_hba.conf, and pg_ident.conf from the file tree traversal.