682 has landed so this PR should be merged/rebased and any conflicts fixed before we can land. Sorry @ayrx!