mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
Extract assemble_roster_resolution<F, Fut> from build_roster_resolution containing duplicate detection, conditional fetch_hints call, and finalize_roster_resolution delegation. build_roster_resolution reduces to: gather slugs, tokio::join! scan + archive, delegate with the real fetch_candidate_hints closure. Four tokio::test cases against the production function pin both mutations: - duplicate pair -> fetcher invoked with exactly those pubkeys (mut a fails) - single instance -> fetcher never called / panic fires (mut b fails) - trusted archive archives one of a pair -> fetcher suppressed (mut b fails) - untrusted archive with pair -> fetcher called conservatively (mut a fails) Mutation (a) replace conditional fetch with HashMap::new(): 2 tests fail Mutation (b) remove emptiness gate / always fetch: 2 tests fail 337/337 buzz-cli tests pass. fmt + clippy clean. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>