fix(enable): gate the push-disabled election report like doctor's

Commit

Stefan Haubold4d ago

Trail finding 01M6E98RBJH1, real: the arm added in b88ca1974b reported every failed election with the --checkpoint-push-remote remedy attached, while describeSyncDisabled gates both halves โ€” and its reasons apply here unchanged.

The remedy is now gated on errors.As: the resolver also fails closed on settings or git remotes it could not read, and advice about naming a remote answers neither, so an unrecognized cause gets the fact and no remedy. The report as a whole is gated on syncAffected(): a repo whose every remote is pinned to a dedicated checkpoint_remote bypasses the election, so a broken selection costs it nothing and "re-enabling pushing would run into that" would be false.

Both gates live in reportDisabledElectionFailure, which takes the error and the verdict rather than resolving them, so each one is reachable from a test โ€” the earlier shape left the errors.As branch with no way to construct a non-matching election error.

Four table cases, mutation-checked: dropping either gate fails exactly the subtest that covers it.

Co-Authored-By: Claude Opus 5 noreply@anthropic.com Entire-Checkpoint: 01M6E9ZSAKW3XYABES0BBF5PT1