@@ -171,7 +171,8 @@ impl AgentV1Challenge {
171171 }
172172
173173 fn entry ( body : & ChallengesBody ) -> Result < & ChallengeEntry , ChallengeError > {
174- body. get ( CHALLENGE_ID_BYTES ) . ok_or_else ( || ChallengeError :: UnknownChallenge ( CHALLENGE_ID . into ( ) ) )
174+ body. get ( CHALLENGE_ID_BYTES )
175+ . ok_or_else ( || ChallengeError :: UnknownChallenge ( CHALLENGE_ID . into ( ) ) )
175176 }
176177 fn policy ( body : & ChallengesBody ) -> Result < & ParticipantPolicy , ChallengeError > {
177178 Ok ( & Self :: entry ( body) ?. policy )
@@ -231,14 +232,17 @@ impl Challenge for AgentV1Challenge {
231232 attest : & dyn AttestationLookup ,
232233 ) -> Result < BTreeMap < Hotkey , ScoreOrAbsence > , ChallengeError > {
233234 let expected = self . expected_set ( ctx) ?;
234- Ok ( expected. iter ( ) . map ( |h| {
235- let call = calls. get ( h) . cloned ( ) . unwrap_or ( MinerCallOutcome :: Observed {
236- duration_ms : 0 ,
237- outcome : CallOutcome :: ChallengeInternal ,
238- expected_model_patch : Vec :: new ( ) ,
239- } ) ;
240- ( * h, self . score_one ( ctx, * h, & call, attest) )
241- } ) . collect ( ) )
235+ Ok ( expected
236+ . iter ( )
237+ . map ( |h| {
238+ let call = calls. get ( h) . cloned ( ) . unwrap_or ( MinerCallOutcome :: Observed {
239+ duration_ms : 0 ,
240+ outcome : CallOutcome :: ChallengeInternal ,
241+ expected_model_patch : Vec :: new ( ) ,
242+ } ) ;
243+ ( * h, self . score_one ( ctx, * h, & call, attest) )
244+ } )
245+ . collect ( ) )
242246 }
243247
244248 fn sign_leaf (
@@ -293,7 +297,9 @@ pub fn correct_http200_fixture(netuid: u16, epoch: u64, miner: &Hotkey) -> CallO
293297/// Helper: `NoScore` reason for missing call coverage (D24).
294298#[ must_use]
295299pub fn silence_is_bug_leaf ( ) -> ScoreOrAbsence {
296- ScoreOrAbsence :: NoScore { reason : NoScoreReasonCode :: ChallengeInternal }
300+ ScoreOrAbsence :: NoScore {
301+ reason : NoScoreReasonCode :: ChallengeInternal ,
302+ }
297303}
298304
299305/// Sign exactly one leaf per `h ∈ expected`. Refuses subset/superset (D24).
@@ -318,10 +324,14 @@ pub fn emit_signed_leaf_set(
318324 if !extra. is_empty ( ) {
319325 return Err ( LeafEmitError :: UnknownHotkeys ( extra. join ( "," ) ) ) ;
320326 }
321- scores. iter ( ) . map ( |( h, s) | {
322- make_signed_leaf ( secret, CHALLENGE_ID_BYTES , * h, epoch, s. clone ( ) )
323- . map ( |l| ( * h, l) ) . map_err ( |e| LeafEmitError :: Sign ( e. to_string ( ) ) )
324- } ) . collect ( )
327+ scores
328+ . iter ( )
329+ . map ( |( h, s) | {
330+ make_signed_leaf ( secret, CHALLENGE_ID_BYTES , * h, epoch, s. clone ( ) )
331+ . map ( |l| ( * h, l) )
332+ . map_err ( |e| LeafEmitError :: Sign ( e. to_string ( ) ) )
333+ } )
334+ . collect ( )
325335}
326336
327337/// Cover `E` from operator-side verify results (Harbor grade).
@@ -335,7 +345,10 @@ pub fn score_epoch_from_verify(
335345 ctx : & EpochCtx ,
336346 results : & BTreeMap < Hotkey , Result < Reward , VerifyError > > ,
337347) -> Result < BTreeMap < Hotkey , ScoreOrAbsence > , ChallengeError > {
338- Ok ( cover_expected_verify_leaves ( & challenge. expected_set ( ctx) ?, results) )
348+ Ok ( cover_expected_verify_leaves (
349+ & challenge. expected_set ( ctx) ?,
350+ results,
351+ ) )
339352}
340353
341354/// Map one verify grade into a leaf (no retries).
@@ -490,9 +503,7 @@ mod tests {
490503 } ) ,
491504 "hotkey must not be silent"
492505 ) ;
493- let leaf = ch
494- . sign_leaf ( & sk, h, 7 , scores[ & h] . clone ( ) )
495- . expect ( "sign" ) ;
506+ let leaf = ch. sign_leaf ( & sk, h, 7 , scores[ & h] . clone ( ) ) . expect ( "sign" ) ;
496507 assert ! ( matches!(
497508 leaf. score_or_absence,
498509 ScoreOrAbsence :: NoScore {
0 commit comments