Remove connection_ap_attach_pending(0) from per-second callback.
Thanks to the attach_pending_entry_connections_ev logic, this call doesn't need to be in the per-second callback at all.
To upload designs, you'll need to enable LFS and have admin enable hashed storage. More information